comparison Lib/IMPL/Web/View/TTLoader.pm @ 287:2d253e6e4a88

*TTView refactoring
author cin
date Tue, 19 Feb 2013 03:05:10 +0400
parents 546957c50a36
children 85572f512abc
comparison
equal deleted inserted replaced
286:d357b5d85d25 287:2d253e6e4a88
75 75
76 $this->_init(); 76 $this->_init();
77 77
78 my $opts = { %{ $this->options } }; 78 my $opts = { %{ $this->options } };
79 79
80 $opts->{STASH} = $this->context->stash->clone(); 80 $this->context->localise();
81 $opts->{LOAD_TEMPLATES} = $this->provider; 81 my $ctx = Template::Context->new( %{$this->context} );
82 82 $this->context->delocalise();
83 return TTDocument->new( $tt, $opts, $this, $vars ); 83
84 return TTDocument->new( $tt, $ctx, $this, $vars );
84 } 85 }
85 86
86 sub template { 87 sub template {
87 my ($this,$name) = @_; 88 my ($this,$name) = @_;
88 89