fix from Jon Schutz
Jonathan Rockway [Mon, 22 Oct 2007 04:53:07 +0000 (04:53 +0000)]
lib/Catalyst.pm
lib/Catalyst/Stats.pm

index 66021fa..0e0bf01 100644 (file)
@@ -1266,24 +1266,29 @@ sub _stats_start_execute {
         }
     }
 
+    my $uid = "$code" . $c->counter->{"$code"};
+
     # is this a root-level call or a forwarded call?
     if ( $callsub =~ /forward$/ ) {
 
         # forward, locate the caller
         if ( my $parent = $c->stack->[-1] ) {
             $c->stats->profile(begin => $action, 
-                               parent => "$parent" . $c->counter->{"$parent"});
+                               parent => "$parent" . $c->counter->{"$parent"},
+                              uid => $uid);
         }
         else {
 
             # forward with no caller may come from a plugin
-            $c->stats->profile(begin => $action);
+            $c->stats->profile(begin => $action,
+                              uid => $uid);
         }
     }
     else {
         
         # root-level call
-        $c->stats->profile(begin => $action);
+        $c->stats->profile(begin => $action,
+                          uid => $uid);
     }
     return $action;
 
index 66e9a40..7a9776c 100644 (file)
@@ -62,7 +62,7 @@ sub profile {
     }
     if ($params{parent}) {
     # parent is explicitly defined
-    $prev = $parent = $self->_get_uid($params{parent}) or return undef;
+    $prev = $parent = $self->_get_uid($params{parent});
     }
     if (!$parent) {
     # Find previous node, which is either previous sibling or parent, for ref time.