Daemonise::Plugin::Daemon - Daemonise plugin handling PID file and forking
version 2.13
use Daemonise; my $d = Daemonise->new(); $d->debug(1); $d->foreground(1) if $d->debug; $d->config_file('/path/to/some.conf'); $d->configure; # fork and run in background (unless foreground is true) $d->start(\&main); sub main { # check if daemon is running already $d->status; }
deactivate code looping for deamon this could be done with MouseX::NativeTraits, but i didn't want to use another module for just changing boolean values
Lenz Gschwendtner <norbu09@cpan.org>
This software is copyright (c) 2013 by Lenz Gschwendtner.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Daemonise, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Daemonise
CPAN shell
perl -MCPAN -e shell install Daemonise
For more information on module installation, please visit the detailed CPAN module installation guide.