Bug fix for issue reported on the mailing list by Toby Corkindale
Tomas Doran [Tue, 15 Dec 2009 10:21:32 +0000 (10:21 +0000)]
Changes
lib/Catalyst/Script/FastCGI.pm
t/aggregate/unit_core_script_fastcgi.t

diff --git a/Changes b/Changes
index a6928dd..79551fe 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+  Bug fixes:
+   - Remove the erroneous --detach option from Catalyst::Script::FastCGI
+   - --daemon option to Catalyst::Script::FastCGI is fixed.
+
 5.80016 2009-12-11 23:23:33
 
   Bug fixes:
index 8bd3c57..271d575 100644 (file)
@@ -55,14 +55,6 @@ has nproc => (
     documentation => 'Specify a number of child processes',
 );
 
-has detach => (
-    traits        => [qw(Getopt)],
-    cmd_aliases   => 'det',
-    isa           => Bool,
-    is            => 'ro',
-    documentation => 'Detach this FastCGI process',
-);
-
 sub _application_args {
     my ($self) = shift;
     return (
@@ -71,7 +63,7 @@ sub _application_args {
             nproc   => $self->nproc,
             pidfile => $self->pidfile,
             manager => $self->manager,
-            detach  => $self->detach,
+            detach  => $self->daemon,
             keep_stderr => $self->keeperr,
         }
     );
index 6ffee95..b5d3ea4 100644 (file)
@@ -19,8 +19,8 @@ testOption( [ qw|-l /tmp/foo| ], ['/tmp/foo', opthash()] );
 testOption( [ qw/-l 127.0.0.1:3000/ ], ['127.0.0.1:3000', opthash()] );
 
 #daemonize           -d --daemon
-testOption( [ qw/-d/ ], [undef, opthash()] );
-testOption( [ qw/--daemon/ ], [undef, opthash()] );
+testOption( [ qw/-d/ ], [undef, opthash(detach => 1)] );
+testOption( [ qw/--daemon/ ], [undef, opthash(detach => 1)] );
 
 # pidfile        -pidfile -p                 --pid --pidfile
 testOption( [ qw/--pidfile cat.pid/ ], [undef, opthash(pidfile => 'cat.pid')] );
@@ -39,10 +39,6 @@ testOption( [ qw/-e/ ], [undef, opthash(keep_stderr => 1)] );
 testOption( [ qw/--nproc 6/ ], [undef, opthash(nproc => 6)] );
 testOption( [ qw/--n 6/ ], [undef, opthash(nproc => 6)] );
 
-# detach
-testOption( [ qw/--detach/ ], [undef, opthash(detach => 1)] );
-testOption( [ qw/--det/ ], [undef, opthash(detach => 1)] );
-
 done_testing;
 
 sub testOption {