package Catalyst::Script::FastCGI;
-
-BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
use Moose;
use MooseX::Types::Moose qw/Str Bool Int/;
+use Data::OptList;
use namespace::autoclean;
+sub _plack_engine_name { 'FCGI' }
+
with 'Catalyst::ScriptRole';
has listen => (
documentation => 'Specify a number of child processes',
);
+sub _plack_loader_args {
+ my ($self) = shift;
+ return (
+ map { $_->[0] => $self->${ \($_->[1] ? $_->[1]->[0] : $_->[0]) } }
+ Data::OptList::mkopt([
+ qw/pidfile listen manager nproc keep_stderr/,
+ detach => [ 'daemon'],
+ ])
+ );
+}
+
sub _application_args {
my ($self) = shift;
return (