Merge 'trunk' into 'better_scripts'
Tomas Doran [Thu, 26 Nov 2009 22:46:26 +0000 (22:46 +0000)]
r12057@t0mlaptop (orig r12022):  t0m | 2009-11-26 01:21:22 +0000
Back out 11979 until I work out why IPC::Run is getting hold of the FCGI file handle
r12070@t0mlaptop (orig r12035):  t0m | 2009-11-26 21:29:32 +0000
Fix test on bleadperl RT#52100

Changes
lib/Catalyst/Engine/FastCGI.pm
t/live_fork.t

diff --git a/Changes b/Changes
index 012815c..adc4932 100644 (file)
--- a/Changes
+++ b/Changes
@@ -6,8 +6,7 @@
      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)
+   - Fix t/live_fork.t with bleadperl (RT#52100)
 
   Refactoring / cleanups:
    - NoTabs and Pod tests moved to t/author so that they're not run
index b8e0635..a6e9688 100644 (file)
@@ -144,11 +144,6 @@ sub run {
 
         $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();
index d10e9d5..1fefc2a 100644 (file)
@@ -26,7 +26,6 @@ plan skip_all => 'Skipping fork tests: no /bin/ls'
 plan tests => 13; # otherwise
 
 {
-  system:
     ok(my $result = get('/fork/system/%2Fbin%2Fls'), 'system');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];
@@ -37,7 +36,6 @@ plan tests => 13; # otherwise
 }
 
 {
-  backticks:
     ok(my $result = get('/fork/backticks/%2Fbin%2Fls'), '`backticks`');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];
@@ -49,7 +47,6 @@ plan tests => 13; # otherwise
     like($result_ref->{result}, qr{\n.*\n}m, 'contains two newlines');
 }
 {
-  fork:
     ok(my $result = get('/fork/fork'), 'fork');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];