revert a mistaken optimizion in how we create (or dont create) a stats object
John Napiorkowski [Tue, 28 Apr 2015 17:02:38 +0000 (12:02 -0500)]
lib/Catalyst.pm

index a3608be..068a249 100644 (file)
@@ -2306,9 +2306,7 @@ sub prepare {
 
     $c->response->_context($c);
 
-    if($c->use_stats) {
-      $c->stats($class->composed_stats_class->new)->enable;
-    }
+    $c->stats($class->stats_class->new)->enable($c->use_stats);
 
     if ( $c->debug || $c->config->{enable_catalyst_header} ) {
         $c->res->headers->header( 'X-Catalyst' => $Catalyst::VERSION );