comparison Lib/IMPL/Web/View/TTContext.pm @ 394:2c14f66efa08

minor changes
author cin
date Tue, 18 Feb 2014 18:17:20 +0400
parents ced5937ff21a
children 38cb0b80e88e
comparison
equal deleted inserted replaced
393:69a1f1508696 394:2c14f66efa08
96 my @inc = ($this->base, @{$this->includes || []}); 96 my @inc = ($this->base, @{$this->includes || []});
97 #my @inc = @{$this->includes || []}; 97 #my @inc = @{$this->includes || []};
98 98
99 my $ext = $this->tt_ext || ""; 99 my $ext = $this->tt_ext || "";
100 100
101 #warn "find: $name";
102
101 my $file; 103 my $file;
102 104
103 foreach my $dir (@inc) { 105 foreach my $dir (@inc) {
104 $file = $dir ? "$dir/$name" : $name; 106 $file = $dir ? "$dir/$name" : $name;
105 107
108 my $templateName = pop @parts; 110 my $templateName = pop @parts;
109 111
110 my $base = join('/',@parts); 112 my $base = join('/',@parts);
111 113
112 $file = $ext ? "$file.$ext" : $file; 114 $file = $ext ? "$file.$ext" : $file;
115
116 #warn " file: $file";
113 117
114 if (exists($this->modules->{$file})) { 118 if (exists($this->modules->{$file})) {
115 my $info = $this->modules->{$file}; 119 my $info = $this->modules->{$file};
116 return $cache->{$name} = $info 120 return $cache->{$name} = $info
117 if $info; 121 if $info;
296 template => $info, 300 template => $info,
297 base => $this->base, 301 base => $this->base,
298 initialized => 1 302 initialized => 1
299 }; 303 };
300 } 304 }
301 305
302 return $this->invoke_environment( 306 return $this->invoke_environment(
303 sub { 307 sub {
304 my $ctx = shift; 308 my $ctx = shift;
305 309
306 unless($info->{initialized}) { 310 unless($info->{initialized}) {