| Acme-Matt-Daemon documentation | Contained in the Acme-Matt-Daemon distribution. |
Acme::Matt::Daemon - MATT DAEMON
Version 0.01
MATT DAEMON
perl -MAcme::Matt::Daemon -e 'MATT DAEMON'
MATT DAEMON
http://www.youtube.com/watch?v=ZWTzyU5MFgM
Acme::Matt::Daemon will daemonize and output MATT DAEMON to your syslog at every 15 to 60 minutes (randomly). Enjoy!
Robert Krimen, <rkrimen at cpan.org>
Please report any bugs or feature requests to bug-acme-matt-daemon at rt.cpan.org, or through
the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-Matt-Daemon. I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Acme::Matt::Daemon
You can also look for information at:
Copyright 2009 Robert Krimen, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Acme-Matt-Daemon documentation | Contained in the Acme-Matt-Daemon distribution. |
package Acme::Matt::Daemon; use warnings; use strict;
our $VERSION = '0.01'; use vars qw/@ISA @EXPORT/; @ISA = qw/Exporter/; @EXPORT = qw/MATT DAEMON DAMON MATTDAMON MATTDAEMON/; use Log::Syslog::Abstract qw/openlog syslog closelog/; use Proc::Daemon; sub MATT { } my @interval = map { $_ * 60 } qw/15 60/; $interval[1] -= $interval[0]; sub DAEMON { print "MATT DAEMON\n"; Proc::Daemon::Init; while (1) { openlog( 'matt-daemon', '', 'local0' ); syslog( 'info', '%s', 'MATT DAEMON' ); closelog; sleep($interval[0] + int rand $interval[1]); } } *DAMON = \&DAEMON; *MATTDAMON = \&DAEMON; *MATTDAEMON = \&DAEMON;
'MATT DAEMON'; # End of Acme::Matt::Daemon