[Catalyst-commits] r11979 - in Catalyst-Runtime/5.80/trunk: . lib/Catalyst/Engine

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Mon Nov 23 21:45:55 GMT 2009


Author: t0m
Date: 2009-11-23 21:45:55 +0000 (Mon, 23 Nov 2009)
New Revision: 11979

Modified:
   Catalyst-Runtime/5.80/trunk/Changes
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/FastCGI.pm
Log:
Nasty hack for fastcgi, fixes gitalist

Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes	2009-11-23 21:25:19 UTC (rev 11978)
+++ Catalyst-Runtime/5.80/trunk/Changes	2009-11-23 21:45:55 UTC (rev 11979)
@@ -6,6 +6,8 @@
      upgraded, may get upgraded even after they are encoded, and will
      produce the same output either way, but bytes::length returns too big
      values for upgraded strings containing characters >127
+   - Make FastCGI compatible with modules which use the fileno call to
+     determine if a file is open (E.g. IPC::Run)
 
   Refactoring / cleanups:
    - NoTabs and Pod tests moved to t/author so that they're not run

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/FastCGI.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/FastCGI.pm	2009-11-23 21:25:19 UTC (rev 11978)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/FastCGI.pm	2009-11-23 21:45:55 UTC (rev 11979)
@@ -144,6 +144,11 @@
 
         $self->_fix_env( \%env );
 
+        # hack for perl libraries that use FILENO (e.g. IPC::Run)
+        # trying to patch FCGI.pm, but not got there yet :/
+        local *FCGI::Stream::FILENO = sub { -2 }
+            unless FCGI::Stream->can('FILENO');
+
         $class->handle_request( env => \%env );
 
         $proc_manager && $proc_manager->pm_post_dispatch();




More information about the Catalyst-commits mailing list