From: Tomas Doran Date: Mon, 31 Oct 2011 18:22:18 +0000 (+0000) Subject: Put prepare_connection back as Engine::PSGI uses it X-Git-Tag: 5.90008~16^2~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ddcd2fc4728111853841078cc5d9a117b993ea96;hp=d5f4b4343c1fbca2dac90249c74466a80f79cd5a;p=catagits%2FCatalyst-Runtime.git Put prepare_connection back as Engine::PSGI uses it --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index ce007cd..9f683bb 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -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 diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 15064ef..ce40740 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -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