NAME

Daemon::Easy - easily create a daemon

This is a pretty light weight module for easily creating a daemon.

The execution of the daemon is controlled by checking whether a stopfile exists in each running loop.

The pidfile stores the pid of the running daemon.

SYNOPSIS

    use Daemon::Easy sleep=>5, stopfile=>'stop', pidfile=>'pid', callback=>'worker';

    sub worker{
        print "i am alive\n";
    }

    run();

    in the shell:
    ./yourdaemon.pl [start stop restart status]

DESCRIPTION

AUTHOR

Zhang Jun, < jzhang533@gmail.com >

COPYRIGHT AND LICENSE

Copyright (C) 2008 by Zhang Jun

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.