From: Rafael Kitover Date: Tue, 13 Oct 2009 14:37:02 +0000 (+0000) Subject: more correct fix for uninitialized warning from ACL X-Git-Tag: 5.80014~30 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=91740f34e8824d0368eecb9e3e1b40b0957e135b more correct fix for uninitialized warning from ACL --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index ae60661..f538529 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1629,12 +1629,13 @@ sub _stats_start_execute { # is this a root-level call or a forwarded call? if ( $callsub =~ /forward$/ ) { + my $parent = $c->stack->[-1]; # forward, locate the caller - if ( my $parent = $c->stack->[-1] ) { + if ( exists $c->counter->{"$parent"} ) { $c->stats->profile( begin => $action, - parent => "$parent" . ($c->counter->{"$parent"} || 0), + parent => "$parent" . $c->counter->{"$parent"}, uid => $uid, ); }