X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=ffae6011f8ba59d7d0cd482a0a9e6a9ba218c6d5;hb=29076427c02971d7b3e65326131ff77ca5a43de7;hp=1c45fbb4c890b869fa4f249a0b4caa9a86b04af4;hpb=94edbd2cb9cb1f63d5e10bff36e4218c44d2e978;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 1c45fbb..ffae601 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -79,7 +79,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.80030'; +our $VERSION = '5.80031'; sub import { my ( $class, @arguments ) = @_; @@ -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;