Fix stringification of dispatcher and engine in debug output
Tomas Doran [Wed, 24 Dec 2008 10:15:29 +0000 (10:15 +0000)]
Changes
TODO
lib/Catalyst.pm
t/plugin_new_method_backcompat.t

diff --git a/Changes b/Changes
index c22ea2b..ec113e6 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+        - Make debug output show class name for the engine and dispatcher
+          rather than the stringified ref. (t0m)
         - Make MyApp immutable at the end of the scope after the setup
           method is called, fixing issues with plugins which have their 
           own new methods by inlining a constructor on MyApp (t0m)
diff --git a/TODO b/TODO
index 7a0c003..b64254b 100644 (file)
--- a/TODO
+++ b/TODO
@@ -20,7 +20,6 @@ Back-compat investigation / konwon issues:
 
   - Fix memory leaks (I already tried Devel::Leak::Object, but no joy).
 
-
 Cleanups:
 
   - Catalyst-Plugin-Authorization-ACL, Can't locate object method "tree" 
index 15b231b..a1fc1fb 100644 (file)
@@ -973,8 +973,8 @@ EOF
         my $engine     = $class->engine;
         my $home       = $class->config->{home};
 
-        $class->log->debug(qq/Loaded dispatcher "$dispatcher"/);
-        $class->log->debug(qq/Loaded engine "$engine"/);
+        $class->log->debug(sprintf(q/Loaded dispatcher "%s"/, blessed($dispatcher)));
+        $class->log->debug(sprintf(q/Loaded engine "%s"/, blessed($engine)));
 
         $home
           ? ( -d $home )
index 7aaef8b..781f3ab 100644 (file)
@@ -13,5 +13,6 @@ use FindBin;
 use lib "$FindBin::Bin/lib";use Test::More tests => 3;
 
 use Catalyst::Test qw/TestAppPluginWithNewMethod/; # 1 test for adding a modifer not throwing.
+BEGIN { warn("COMPILE TIME finished use of Catalyst::Test"); }
 ok request('/foo')->is_success; 
 is $TestAppPluginWithNewMethod::MODIFIER_FIRED, 1, 'Before modifier was fired correctly.';