From: Tomas Doran Date: Wed, 24 Dec 2008 10:15:29 +0000 (+0000) Subject: Fix stringification of dispatcher and engine in debug output X-Git-Tag: 5.8000_05~82 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=01ce70757e2be0d27df667a7b0e898b0d91476ec;hp=730533aeeda86c4934c6fdf0bb714366fa8bddc2 Fix stringification of dispatcher and engine in debug output --- diff --git a/Changes b/Changes index c22ea2b..ec113e6 100644 --- 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 --- 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" diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 15b231b..a1fc1fb 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -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 ) diff --git a/t/plugin_new_method_backcompat.t b/t/plugin_new_method_backcompat.t index 7aaef8b..781f3ab 100644 --- a/t/plugin_new_method_backcompat.t +++ b/t/plugin_new_method_backcompat.t @@ -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.';