[Catalyst-commits] r12594 - Catalyst-Runtime/5.80/branches/psgi/lib

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Sun Jan 10 06:31:06 GMT 2010


Author: rafl
Date: 2010-01-10 06:31:03 +0000 (Sun, 10 Jan 2010)
New Revision: 12594

Modified:
   Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm
Log:
Look up the method just once.

Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm	2010-01-10 04:42:21 UTC (rev 12593)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm	2010-01-10 06:31:03 UTC (rev 12594)
@@ -1900,10 +1900,9 @@
         $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);




More information about the Catalyst-commits mailing list