X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=329a76f701f629968beb0df56b2302b3118b3095;hp=52398b8f8f73c69654c7d9227e14566da039e11d;hb=0bfda603359d0f9f36a5b13856ab025fc8bd8abe;hpb=44d28c7d3def77dbf71d53b97362247a7329a513 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 52398b8..329a76f 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1900,10 +1900,9 @@ sub prepare { $c->res->headers->header( 'X-Catalyst' => $Catalyst::VERSION ); } - #XXX reuse coderef from can # Allow engine to direct the prepare flow (for POE) - if ( $c->engine->can('prepare') ) { - $c->engine->prepare( $c, @arguments ); + if ( my $prepare = $c->engine->can('prepare') ) { + $c->engine->$prepare( $c, @arguments ); } else { $c->prepare_request(@arguments);