From: Christian Hansen Date: Wed, 23 Mar 2005 04:54:48 +0000 (+0000) Subject: changed examples in Cookbook.pod X-Git-Tag: 5.7099_04~1714 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=1c61c726cbf3a9ee7ffa15299e34a8700383e670 changed examples in Cookbook.pod --- diff --git a/lib/Catalyst/Manual/Cookbook.pod b/lib/Catalyst/Manual/Cookbook.pod index 0ed84d3..d4641fc 100644 --- a/lib/Catalyst/Manual/Cookbook.pod +++ b/lib/Catalyst/Manual/Cookbook.pod @@ -291,14 +291,7 @@ a normal, single-shot CGI script. my $request = FCGI::Request(); while ($request->Accept() >= 0) { - my $output; - { - local(*STDOUT); - open( STDOUT, '>', \$output ); - MyApp->run; - } - $output =~ s!^HTTP/\d+.\d+ \d\d\d.*?\n!!s; - print $output; + MyApp->run; } Any initialization code should be included outside the request-accept loop. @@ -362,13 +355,8 @@ run. # PP-specific initialization code } } - { - local(*STDOUT); - open( STDOUT, '>', \$output ); - MyApp->run; - } - $output =~ s!^HTTP/\d+.\d+ \d\d\d.*?\n!!s; - print $output; + + MyApp->run; For more information see the C documentation.