Fixed C::E::CGI to allow reuse of CGI.pm object
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / CGI.pm
index 6d0fd12..e80c727 100644 (file)
@@ -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;
 }