| 1 | package Plack::Handler::FCGI::Engine::ProcManager; | ||
| 2 | use Moose; | ||
| 3 | |||
| 4 | our $VERSION = '0.22'; | ||
| 5 | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 6 | |||
| 7 | extends 'FCGI::Engine::ProcManager'; | ||
| 8 | |||
| 9 | has 'pidfile' => ( | ||
| 10 | init_arg => 'pid_fname', | ||
| 11 | is => 'rw', | ||
| 12 | isa => 'MooseX::Daemonize::Pid::File', | ||
| 13 | coerce => 1, | ||
| 14 | ); | ||
| 15 | |||
| 16 | # FCGI::ProcManager compat | ||
| 17 | |||
| 18 | sub pm_manage { (shift)->manage( @_ ) } | ||
| 19 | sub pm_pre_dispatch { (shift)->pre_dispatch( @_ ) } | ||
| 20 | sub pm_post_dispatch { (shift)->post_dispatch( @_ ) } | ||
| 21 | |||
| 22 | sub notify { | ||
| 23 | my ($self, $msg) = @_; | ||
| 24 | $msg =~ s/\s*$/\n/; | ||
| 25 | print STDERR "FastCGIEngine: " . $self->role() . " (pid $$): " . $msg; | ||
| 26 | } | ||
| 27 | |||
| 28 | __PACKAGE__->meta->make_immutable; | ||
| 29 | |||
| 30 | no Moose; 1; | ||
| 31 | |||
| 32 | __END__ |