[Catalyst] Catalyst::View::TT bug if DUMP_CONFIG enabled

Svilen Ivanov svilen.ivanov at gmail.com
Tue Feb 6 21:05:06 GMT 2007


Hi,

There is runtime error when I enable DUMP_CONFIG in C::V::TT that
prints Template toolkit configuration. The error is:

Couldn't instantiate component "My::V::TT", "Undefined subroutine
&Catalyst::View::TT::Dump called at
/usr/local/share/perl/5.8.8/Catalyst/View/TT.pm line 120." at
script/my_server.pl line 52

Here is very simple patch that solves the problem:

diff -upNr Catalyst-View-TT-0.25.orig/lib/Catalyst/View/TT.pm
Catalyst-View-TT-0.25/lib/Catalyst/View/TT.pm
--- Catalyst-View-TT-0.25.orig/lib/Catalyst/View/TT.pm  2007-02-06
23:00:05.000000000 +0200
+++ Catalyst-View-TT-0.25/lib/Catalyst/View/TT.pm       2007-02-06
23:00:32.000000000 +0200
@@ -117,7 +117,7 @@ sub new {
     }

     if ( $c->debug && $config->{DUMP_CONFIG} ) {
-        $c->log->debug( "TT Config: ", Dump($config) );
+        $c->log->debug( "TT Config: ", Data::Dump::dump($config) );
     }
     if ( $config->{PROVIDERS} ) {
         my @providers = ();


Regards,
Svi



More information about the Catalyst mailing list