From: Christian Hansen Date: Thu, 21 Apr 2005 20:17:53 +0000 (+0000) Subject: Fixed C::E::CGI to allow reuse of CGI.pm object X-Git-Tag: 5.7099_04~1457 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=3f822a28dfe633611ba16b252243b0e6d2c6abcd Fixed C::E::CGI to allow reuse of CGI.pm object --- diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 00fecbc..eee80b8 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -387,7 +387,7 @@ sub handler { return $status; } -=item $c->prepare($r) +=item $c->prepare($engine) Turns the engine-specific request( Apache, CGI ... ) into a Catalyst context . diff --git a/lib/Catalyst/Engine/CGI.pm b/lib/Catalyst/Engine/CGI.pm index 6d0fd12..e80c727 100644 --- a/lib/Catalyst/Engine/CGI.pm +++ b/lib/Catalyst/Engine/CGI.pm @@ -184,8 +184,8 @@ sub prepare_path { =cut sub prepare_request { - my $c = shift; - $c->cgi( CGI->new ); + my ( $c, $cgi ) = @_; + $c->cgi( $cgi || CGI->new ); $c->cgi->_reset_globals; }