diff Lib/IMPL/Web/View/TTLoader.pm @ 289:85572f512abc

*TTView refactoring
author cin
date Wed, 20 Feb 2013 02:25:30 +0400
parents 2d253e6e4a88
children 47a09a8dc23a
line wrap: on
line diff
--- a/Lib/IMPL/Web/View/TTLoader.pm	Tue Feb 19 19:58:27 2013 +0400
+++ b/Lib/IMPL/Web/View/TTLoader.pm	Wed Feb 20 02:25:30 2013 +0400
@@ -78,7 +78,7 @@
     my $opts = { %{ $this->options } };
     
     $this->context->localise();
-    my $ctx = Template::Context->new( %{$this->context} );
+    my $ctx = _clone_context($this->context);
     $this->context->delocalise();
     
     return TTDocument->new( $tt, $ctx, $this, $vars );
@@ -146,6 +146,13 @@
     }
 }
 
+sub _clone_context {
+    my $args = { %{shift || {}} };
+    delete $args->{CONFIG};
+    
+    return Template::Context->new($args);
+}
+
 1;
 
 __END__