Fix Apache, added C::E::Apache::MP1 and C::E::Apache::MP2, added $c->finialize_cookies
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / FCGI.pm
index 0ee022b..07410fd 100644 (file)
@@ -3,7 +3,6 @@ package Catalyst::Engine::FCGI;
 use strict;
 use base 'Catalyst::Engine::CGI';
 use FCGI;
-use NEXT;
 
 =head1 NAME
 
@@ -11,7 +10,19 @@ Catalyst::Engine::FCGI - Catalyst FCGI Engine
 
 =head1 SYNOPSIS
 
-See L<Catalyst>.
+A script using the Catalyst::Engine::FCGI module might look like:
+
+    #!/usr/bin/perl -w
+
+    BEGIN { 
+       $ENV{CATALYST_ENGINE} = 'FCGI';
+    }
+
+    use strict;
+    use lib '/path/to/MyApp/lib';
+    use MyApp;
+
+    MyApp->run;
 
 =head1 DESCRIPTION
 
@@ -31,14 +42,7 @@ sub run {
     my $class   = shift;
     my $request = FCGI::Request();
     while ( $request->Accept() >= 0 ) {
-        my $output;
-        {
-            local (*STDOUT);
-            open( STDOUT, '>', \$output );
-            $class->NEXT::run;
-        }
-        $output =~ s!^HTTP/\d+.\d+ \d\d\d.*?\n!!s;
-        print $output;
+        $class->handler;
     }
 }