Branch Coverage

lib/Template/Context.pm
Criterion Covered Total %
branch 131 182 71.9


line true false branch
82 0 2920 if $$self{'DEBUG'}
87 1300 1620 if blessed $name and $name->isa('Template::Document') or ref $name eq 'CODE'
93 423 1197 unless (ref $name)
95 0 423 if $$self{'DEBUG'}
100 187 236 if $template = $$self{'BLOCKS'}{$name}
105 19 122 if $blocks and $template = $$blocks{$name}
111 0 217 if ($^O eq 'MSWin32') { }
113 0 0 if $shortname =~ s/^(\w{2,})://o
116 3 214 if $shortname =~ s/^(\w+)://
119 3 214 if (defined $prefix)
127 1411 3 unless $providers
137 0 1418 if $$self{'DEBUG'}
141 45 1373 if ($error) { }
4 1369 elsif (length $blockname) { }
142 6 39 if ($error == 255)
144 0 6 if (blessed $template and $template->isa('Template::Exception') and $template->type eq 'file') { }
155 3 1 if $template = $template->blocks->{$blockname}
163 35 5 if ref $shortname or not $$self{'EXPOSE_BLOCKS'}
164 1 4 unless $shortname =~ s[/([^/]+)$][]
165 0 4 length $blockname ? :
188 0 0 defined $args ? :
0 210 if $$self{'DEBUG'}
193 204 6 unless $error
194 3 3 if ($error == 255)
195 3 0 if ref $plugin
219 0 0 defined $args ? :
0 0 defined $alias ? :
0 167 if $$self{'DEBUG'}
224 11 156 if not $args || ref $name and $filter = $$self{'FILTER_CACHE'}{$name}
229 147 9 unless $error
230 9 0 if ($error == 255)
231 4 5 if ref $filter
238 0 147 unless $filter
254 8 139 if $alias
300 1584 2 unless ref $template eq 'ARRAY'
305 0 0 defined $params ? :
0 0 $localize ? :
0 1586 if $$self{'DEBUG'}
312 261 1305 if ($localize) { }
327 85 129 ref $name ? :
214 1354 ref $compiled eq 'CODE' ? :
331 285 1283 if (blessed $component and $component->isa('Template::Document'))
339 1306 262 unless ($localize)
342 1287 0 if blessed $compiled and $compiled->isa('Template::Document') and $tblocks = $compiled->blocks
347 214 1354 if (ref $compiled eq 'CODE') { }
1354 0 elsif (ref $compiled) { }
358 116 1430 if ($trim)
373 278 1268 if blessed $component and $component->isa('Template::Document')
380 261 1305 if ($localize)
385 22 0 ref $error ? :
22 1544 if $error
423 2 13 ref $file eq 'ARRAY' ? :
426 0 15 if $$self{'DEBUG'}
432 0 17 if ($^O eq 'MSWin32') { }
434 0 0 if $name =~ s/^(\w{2,})://o
437 1 16 if $name =~ s/^(\w+)://
440 1 16 if (defined $prefix) { }
452 12 5 unless $error
453 2 3 if ($error == 255)
454 0 2 if ref $text
499 30 108 if (blessed $error and $error->isa('Template::Exception')) { }
0 108 elsif (blessed $error and $error->isa('Badger::Exception')) { }
103 5 elsif (defined $info) { }
541 141 15 if (blessed $error and $error->isa('Template::Exception') || $error->isa('Badger::Exception')) { }
543 123 18 if $output
622 0 0 unless ref $block
638 1 6 if $is_dynamic
642 7 0 unless $error
643 0 0 if $error == &Template::Constants::STATUS_ERROR
673 1 1 if (defined $$params{'base'})
676 0 1 unless $base
681 0 1 unless blessed $base and $base->isa($VIEW_CLASS)
707 0 1 if ref $views eq 'HASH'
760 9 6 ref $_[-1] eq 'HASH' ? :
763 15 0 if (@args)
764 3 12 if ($args[0] =~ /^on|1$/i) { }
3 9 elsif ($args[0] =~ /^off|0$/i) { }
774 9 6 if (@args)
775 9 0 if ($args[0] =~ /^msg$/i) { }
0 0 elsif ($args[0] =~ /^format$/i) { }
776 0 9 unless $$self{'DEBUG_DIRS'}
778 0 9 unless defined $format
807 0 26 if $method eq 'DESTROY'
809 0 26 unless defined($result = $$self{uc $method})
854 7 437 ref $item eq 'ARRAY' ? :
861 0 3 ref $val ? :
3 0 unless ref $val eq 'ARRAY'
886 39 13 unless ref $block
896 1 147 if $$config{'VIEWS'}
915 1 147 defined $$config{'EXPOSE_BLOCKS'} ? :
921 17 131 defined $$config{'DEBUG'} ? :