App::CLI::Plugin::Daemonize - for App::CLI::Plugin::Extension daemonize plugin module
1.0
# MyApp.pm package MyApp; use strict; use base qw(App::CLI::Extension); # extension method __PACKAGE__->load_plugins(qw(Daemonize)); # extension method __PACKAGE__->config( deemonize => 1 ); 1; # MyApp/Daemonize.pm package MyApp::Daemonize; use strict; use base qw(App::CLI::Command); sub options { return ("daemonize" => "daemonize") }; sub run { my($self, @argv) = @_; # anything to do... } 1; # myapp #!/usr/bin/perl use strict; use MyApp; MyApp->dispatch; # daemon execute [kurt@localhost ~] ./myapp daemonize
App::CLI::Plugin::Daemonize - daemonize plugin module
daemonize method setting
# enable daemonize __PACKAGE__->config( daemonize => 1 );
or if --daemonize option is defined. it applies.
# in MyApp/**.pm sub options { return ( "daemonize" => "daemonize" ) ; } # execute [kurt@localhost ~] ./myapp daemonize --daemonize
Enable daemonize. It usually runs in the setup method, no explicit attempt to
Akira Horimoto
App::CLI::Extension
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Copyright (C) 2010 Akira Horimoto
To install App::CLI::Plugin::Daemonize, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::CLI::Plugin::Daemonize
CPAN shell
perl -MCPAN -e shell install App::CLI::Plugin::Daemonize
For more information on module installation, please visit the detailed CPAN module installation guide.