don't set {CONTEXT} if set
Christian Hansen [Wed, 23 Mar 2005 16:41:23 +0000 (16:41 +0000)]
lib/Catalyst/View/TT.pm

index 27a6422..6a801f4 100644 (file)
@@ -57,7 +57,11 @@ sub new {
         INCLUDE_PATH => [ $root, "$root/base" ],
         %{ $self->config() }
     );
-    $config{CONTEXT} = Template::Timer->new(%config) if $c->debug;
+
+    unless ( $c->debug && not exists $config{CONTEXT} ) {
+       $config{CONTEXT} = Template::Timer->new(%config);
+    }
+
     $self->template( Template->new( \%config ) );
     return $self;
 }