Put prepare_connection back as Engine::PSGI uses it
Tomas Doran [Mon, 31 Oct 2011 18:22:18 +0000 (18:22 +0000)]
lib/Catalyst.pm
lib/Catalyst/Engine.pm

index ce007cd..9f683bb 100644 (file)
@@ -2118,7 +2118,9 @@ Prepares connection.
 
 sub prepare_connection {
     my $c = shift;
-    $c->request->prepare_connection;
+    # XXX - This is called on the engine (not the request) to maintain
+    #       Engine::PSGI back compat.
+    $c->engine->prepare_connection($c);
 }
 
 =head2 $c->prepare_parameters
index 15064ef..ce40740 100644 (file)
@@ -33,6 +33,12 @@ around env => sub {
   return $self->$orig;
 };
 
+# XXX - Only here for Engine::PSGI compat
+sub prepare_connection {
+    my ($self, $ctx) = @_;
+    $ctx->request->prepare_connection;
+}
+
 =head1 NAME
 
 Catalyst::Engine - The Catalyst Engine