Merge branch 'master' into psgi
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Script / FastCGI.pm
index 271d575..c806439 100644 (file)
@@ -1,10 +1,10 @@
 package Catalyst::Script::FastCGI;
-
-BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
 use Moose;
 use MooseX::Types::Moose qw/Str Bool Int/;
 use namespace::autoclean;
 
+sub _plack_engine_name { 'FCGI' }
+
 with 'Catalyst::ScriptRole';
 
 has listen => (
@@ -27,7 +27,7 @@ has daemon => (
     traits        => [qw(Getopt)],
     isa           => Bool,
     is            => 'ro',
-    cmd_aliases   => 'd',
+    cmd_aliases   => [qw/d detach/], # Eww, detach is here as we fucked it up.. Deliberately not documented
     documentation => 'Daemonize (go into the background)',
 );
 
@@ -55,6 +55,14 @@ has nproc => (
     documentation => 'Specify a number of child processes',
 );
 
+sub _plack_loader_args {
+    my ($self) = shift;
+    return (
+        map { $_ => $self->$_() }
+        qw/pidfile listen manager nproc detach keep_stderr/
+    );
+}
+
 sub _application_args {
     my ($self) = shift;
     return (