note in the docs that query_params is an alias for query_paramaters (fixes 03podcoverage)
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index e63fb98..66021fa 100644 (file)
@@ -1271,8 +1271,8 @@ sub _stats_start_execute {
 
         # 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"});
         }
         else {
 
@@ -1281,9 +1281,9 @@ sub _stats_start_execute {
         }
     }
     else {
-
+        
         # root-level call
-       $c->stats->profile(begin => $action);
+        $c->stats->profile(begin => $action);
     }
     return $action;
 
@@ -1347,8 +1347,8 @@ sub finalize {
         $c->finalize_body;
     }
     
-    if ($c->use_stats) {
-        my $elapsed = tv_interval($c->stats->getNodeValue);
+    if ($c->use_stats) {        
+        my $elapsed = sprintf '%f', $c->stats->elapsed;
         my $av = $elapsed == 0 ? '??' : sprintf '%.3f', 1 / $elapsed;
         $c->log->info(
             "Request took ${elapsed}s ($av/s)\n" . $c->stats->report . "\n" );        
@@ -2122,9 +2122,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');
     }
 }