[Catalyst-commits] r12557 - in Catalyst-Runtime/5.80/trunk: . lib/Catalyst/Engine lib/Catalyst/Script t/aggregate

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Sat Jan 9 16:43:25 GMT 2010


Author: t0m
Date: 2010-01-09 16:43:25 +0000 (Sat, 09 Jan 2010)
New Revision: 12557

Modified:
   Catalyst-Runtime/5.80/trunk/Changes
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Script/Server.pm
   Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_script_server.t
Log:
Correctly pass argv option into Catalyst::Engine::HTTP

Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes	2010-01-09 15:58:18 UTC (rev 12556)
+++ Catalyst-Runtime/5.80/trunk/Changes	2010-01-09 16:43:25 UTC (rev 12557)
@@ -12,6 +12,11 @@
    - Fix regression in the case where mod_rewrite is being used to rewrite
      requests into a path below your application base introduced with the
      %2F related fixes in 5.80014_02.
+   - Do not crash on SIGHUP if Catalyst::Engine::HTTP->run is not passed the
+     argv key in the options hash.
+   - Correctly pass the arguments to Catalyst::Script::Server through to
+     Catalyst::Engine::HTTP->run so that the server can restart itself
+     with the correct options on SIGHUP.
 
   Cleanups:
     - Stop suppressing warnings from Class::C3::Adopt::NEXT now that most plugins

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm	2010-01-09 15:58:18 UTC (rev 12556)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm	2010-01-09 16:43:25 UTC (rev 12557)
@@ -339,7 +339,7 @@
         use Config;
         $ENV{PERL5LIB} .= join $Config{path_sep}, @INC;
 
-        exec $^X, $0, @{ $options->{argv} };
+        exec $^X, $0, @{ $options->{argv} || [] };
     }
 
     exit;

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Script/Server.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Script/Server.pm	2010-01-09 15:58:18 UTC (rev 12556)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Script/Server.pm	2010-01-09 16:43:25 UTC (rev 12557)
@@ -190,6 +190,7 @@
         $self->port,
         $self->host,
         {
+           argv => $self->ARGV,
            map { $_ => $self->$_ } qw/
                 fork
                 keepalive

Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_script_server.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_script_server.t	2010-01-09 15:58:18 UTC (rev 12556)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_script_server.t	2010-01-09 16:43:25 UTC (rev 12557)
@@ -89,6 +89,8 @@
     };
     # First element of RUN_ARGS will be the script name, which we don't care about
     shift @TestAppToTestScripts::RUN_ARGS;
+    # Mangle argv into the options..
+    $resultarray->[-1]->{argv} = $argstring;
     is_deeply \@TestAppToTestScripts::RUN_ARGS, $resultarray, "is_deeply comparison " . join(' ', @$argstring);
 }
 




More information about the Catalyst-commits mailing list