comparison Lib/IMPL/Web/View/TTFactory.pm @ 186:6c0fee769b0c

IMPL::Web::View::TTControl tests, fixes
author cin
date Fri, 30 Mar 2012 16:40:34 +0400
parents 47dac58691ee
children 78a18a2b6266
comparison
equal deleted inserted replaced
185:ae8072f2f2a3 186:6c0fee769b0c
26 26
27 $options ||= {}; 27 $options ||= {};
28 28
29 $this->template($template); 29 $this->template($template);
30 $this->context($context || new Template::Context($options)); 30 $this->context($context || new Template::Context($options));
31 $this->opts($options); 31 $this->opts($options || {});
32 $this->nodeProperties($nodeProps || {}); 32 $this->nodeProperties($nodeProps || {});
33 $this->instances(0); 33 $this->instances(0);
34 34
35 # init factory context 35 # init factory context
36 $this->context->process($this->template); 36 $this->context->process($this->template);
43 ); 43 );
44 44
45 sub MergeParameters { 45 sub MergeParameters {
46 my ($this,$name,$refProps) = @_; 46 my ($this,$name,$refProps) = @_;
47 47
48 my $opts = { $this->opts }; 48 my $opts = { %{ $this->opts } };
49 $opts->{STASH} = $opts->{STASH}->clone() if $opts->{STASH}; 49 $opts->{STASH} = $opts->{STASH}->clone() if $opts->{STASH};
50 50
51 my $ctx = new Template::Context($opts); 51 my $ctx = new Template::Context($opts);
52 52
53 return ($name, $this->template, $ctx, hashMerge($this->nodeProperties,$refProps)); 53 return ($name, $this->template, $ctx, hashMerge($this->nodeProperties,$refProps));