Sophie

Sophie

distrib > Mandriva > mes5 > x86_64 > by-pkgid > fd94933ffb5b4c9f5acb3edf2f06a775 > files > 2

perl-Catalyst-View-TT-0.27-2mdv2009.0.src.rpm

Index: lib/Catalyst/View/TT.pm
===================================================================
--- lib/Catalyst/View/TT.pm
+++ lib/Catalyst/View/TT.pm	2008-06-17 12:21:00.000000000 +0200
@@ -137,6 +137,8 @@
     Scalar::Util::weaken($copy);
     $config->{INCLUDE_PATH} = [ sub { $copy->paths } ];
 
+    my $template_class = $config->{template_class} || 'Template';
+
     if ( $config->{PROVIDERS} ) {
         my @providers = ();
         if ( ref($config->{PROVIDERS}) eq 'ARRAY') {
@@ -182,8 +184,8 @@
     }
     
     $self->{template} = 
-        Template->new($config) || do {
-            my $error = Template->error();
+        $template_class->new($config) || do {
+            my $error = $template_class->error();
             $c->log->error($error);
             $c->error($error);
             return undef;