NAME
Proclet::Declare - Declare interface to Proclet
SYNOPSIS
use Proclet::Declare;
color;
env(
DEBUG => 1,
FOO => 1
);
service('web', 'plackup -p 5963 app.psgi');
service('memcached', '/usr/local/bin/memcached', '-p', '11211');
service('worker', './bin/worker');
scheduled('tag', '0 12 * * *', sub { MyDailyWork->run });
worker(
'worker' => 5
);
run;
DESCRIPTION
Proclet::Declare supports to use Proclet declare style
FUNCTIONS
- color
-
Sets colored log
color(); #enable color(1); #enable color(0); #disable
default: disabled
- env
-
Environment values
worker( FOO => 'abc' BAR => 'efg' );
- service
-
Sets the service
# coderef service('tag', sub { MyWorker->run }); # exec command service('tag', '/usr/local/bin/memcached','-vv');
- scheduled
-
scheduled job like cron
# coderef scheduled('tag', '0 12 * * *', sub { MyDailyWork->run }); # exec command scheduled('tag', '0 12 * * *', 'my_daily_job','-execute');
- worker
-
Number of children to fork
worker( process_name => 1 process_name => 5 );
- run
AUTHOR
Masahiro Nagano <kazeburo {at} gmail.com>
Tokuhiro Matsuno
SEE ALSO
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.