[Catalyst-commits] r12615 - Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Tue Jan 12 01:30:27 GMT 2010


Author: t0m
Date: 2010-01-12 01:30:26 +0000 (Tue, 12 Jan 2010)
New Revision: 12615

Modified:
   Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/FastCGI.pm
   Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/Server.pm
Log:
Do the right thing with FCGI args, the hostname and the keepalive options in the scripts so that the Plack servers get them correctly.

There are still a load of options for the dev server (like writing a PID file) that we'll need to add to the plack server (or do ourselves manually?), and the entire set of options we actually pass into the application via ->run is unused by it.

I'm not sure if we are safe to change the original option passing convention or not - need to look at alternate engines and stuff..

Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/FastCGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/FastCGI.pm	2010-01-11 23:36:52 UTC (rev 12614)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/FastCGI.pm	2010-01-12 01:30:26 UTC (rev 12615)
@@ -55,6 +55,14 @@
     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 (

Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/Server.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/Server.pm	2010-01-11 23:36:52 UTC (rev 12614)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/Server.pm	2010-01-12 01:30:26 UTC (rev 12615)
@@ -180,6 +180,15 @@
 
 }
 
+sub _plack_loader_args {
+    my ($self) = shift;
+    return (
+        port => $self->port,
+        host => $self->host,
+        keepalive => $self->keepalive ? 100 : 1,
+    );
+}
+
 sub _application_args {
     my ($self) = shift;
     return (




More information about the Catalyst-commits mailing list