force pod coverage testing for authors
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index e4ff178..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"});
+            $c->stats->profile(begin => $action, 
+                               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;
 
@@ -2122,9 +2127,9 @@ sub setup_stats {
 
     my $env = Catalyst::Utils::env_value( $class, 'STATS' );
     if ( defined($env) ? $env : ($stats || $class->debug ) ) {
-       no strict 'refs';
-       *{"$class\::use_stats"} = sub { 1 };
-       $class->log->debug('Statistics enabled');
+        no strict 'refs';
+        *{"$class\::use_stats"} = sub { 1 };
+        $class->log->debug('Statistics enabled');
     }
 }