From: Tomas Doran Date: Tue, 22 Feb 2011 21:43:07 +0000 (+0000) Subject: This scares me, but it fixes stuf work work X-Git-Tag: 5.80032~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=524b0e1cfa0a5722a3d8f56a2a15fb709e9e71de This scares me, but it fixes stuf work work --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index f8a0210..ffae601 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1660,7 +1660,9 @@ sub execute { push( @{ $c->stack }, $code ); no warnings 'recursion'; - eval { $c->state( $code->execute( $class, $c, @{ $c->req->args } ) || 0 ) }; + # N.B. This used to be combined, but I have seen $c get clobbered if so, and + # I have no idea how, ergo $ret (which appears to fix the issue) + eval { my $ret = $code->execute( $class, $c, @{ $c->req->args } ) || 0; $c->state( $ret ) }; $c->_stats_finish_execute( $stats_info ) if $c->use_stats and $stats_info;