Branch Coverage

blib/lib/Template/Parser/CET.pm
Criterion Covered Total %
branch 123 254 48.4


line true false branch
34 0 698 if (defined(my $debug = $$self{'DEBUG'}))
41 0 698 if ($$self{'NAMESPACE'})
55 7 0 if (not $Template::Parser::CET::ORIG_CONFIG_CLASS or $Template::Parser::CET::ORIG_CONFIG_CLASS ne $Template::Config::PARSER)
63 3 0 if ($Template::Parser::CET::ORIG_CONFIG_CLASS)
72 0 6 if @args % 2
74 1 5 if $args{'activate'}
75 0 6 if $args{'deactivate'}
88 0 735 defined $$info{'DEBUG'} ? :
99 19 716 unless ($tree)
101 19 0 if UNIVERSAL::can($err, 'doc') and not $err->doc
134 298 1094 unless (ref $node)
136 298 0 if defined $result
141 0 1094 if ($$self{'_debug'})
146 0 0 if defined $result
151 0 1094 if $directive eq '|'
152 0 1094 if $directive eq '#'
155 1090 2 if defined $result
176 4 0 @the_rest ? :
177 0 0 if ref $key and @$key == 2 and not ref $$key[0]
178 4 0 if (not ref $key) { }
206 829 1346 unless (ref $var)
207 0 829 if ($val) { }
210 425 404 if $var =~ /^-?[1-9]\d{0,13}(?:|\.0|\.\d{0,13}[1-9])$/
221 429 917 if (ref $name) { }
917 0 elsif (defined $name) { }
222 384 45 if (not defined $$name[0]) { }
224 333 51 if $i >= @$var
231 0 917 if ($$ARGS{'is_namespace_during_compile'}) { }
242 989 24 if (not $args) { }
251 0 491 $$ARGS{'no_dots'} ? :
255 438 53 if ($was_dot_call) { }
256 10 428 if (ref $name) { }
428 0 elsif (defined $name) { }
257 0 10 if (not defined $$name[0]) { }
263 0 428 if ($$ARGS{'is_namespace_during_compile'}) { }
273 328 110 if (not $args) { }
282 2 51 if (ref $name) { }
51 0 elsif (defined $name) { }
283 0 2 if (not defined $$name[0]) { }
289 0 51 if ($$ARGS{'is_namespace_during_compile'}) { }
301 23 30 if ($use_temp_varname) { }
311 6 47 $args ? :
323 2 1011 if ($$self{'_return_capture_ident'}) { }
0 1011 elsif ($return_ref) { }
197 814 elsif ($val) { }
81 733 elsif ($use_temp_varname) { }
324 0 2 if $use_temp_varname
325 0 2 if $val
330 0 0 if $use_temp_varname
331 0 0 if $val
362 0 384 $op eq 'pow' ? :
0 384 $op eq 'mod' ? :
366 30 354 if ($op eq '{}') { }
43 311 elsif ($op eq '[]') { }
42 269 elsif ($op eq '~' or $op eq '_') { }
16 253 elsif ($op eq '=') { }
3 250 elsif ($op eq '++') { }
3 247 elsif ($op eq '--') { }
1 246 elsif ($op eq 'div' or $op eq 'DIV') { }
23 223 elsif ($op eq '?') { }
0 223 elsif ($op eq '\\') { }
1 222 elsif ($op eq 'qr') { }
14 208 elsif (@the_rest == 1) { }
65 143 elsif ($op eq '//' or $op eq 'err') { }
367 1 29 unless @the_rest
371 34 0 @the_rest ? :
407 0 1 $the_rest[1] ? :
424 0 19 unless defined $ident
425 0 19 unless ref $ident
426 0 19 if ref $$ident[0] or not defined $$ident[0]
434 0 0 if $dot ne '.'
435 0 0 if ref $$ident[$i] or not defined $$ident[$i]
498 0 0 if ($$ref[0] eq 'format') { }
0 0 elsif (defined $$self{'_debug'}) { }
503 0 0 if ($$ref[0] eq 'on') { }
0 0 elsif ($$ref[0] eq 'off') { }
533 0 0 if @$named
536 0 0 @$args > 0 ? :
0 0 @$args > 1 ? :
541 0 0 !@$args ? :
542 0 0 $is_entire ? :
590 7 10 !$args ? :
604 11 5 if ($var)
623 0 32 if $unless
630 13 7 if ($$node[0] eq 'ELSE')
631 13 0 if ($$node[4])
641 19 13 unless $had_else
665 0 0 if $type eq 'WHILE' or $type eq 'FOREACH'
672 1 14 unless ref $ref
707 8 2 if $args
711 0 10 if (not $sub_tree && $$sub_tree[0]) { }
3 11 elsif (ref $$sub_tree[0] and $$sub_tree[0][0] eq 'BLOCK') { }
723 2 0 if $hash
730 0 0 if $type eq 'FOREACH'
731 0 0 if $type eq 'WHILE'
738 0 0 unless $$self{'EVAL_PERL'}
754 0 0 unless $$self{'EVAL_PERL'}
760 0 0 unless defined $chunk
761 0 0 unless (ref $chunk)
765 0 0 if $$chunk[0] eq 'END'
784 4 173 if (not defined $val) { }
2 171 elsif ($$node[4] and $val == $$node[4]) { }
788 0 2 if $$sub_tree[0] and $$sub_tree[0][0] eq 'BLOCK'
796 0 175 if ($$Template::Parser::CET::OP_DISPATCH{$op})
797 0 0 unless $op =~ /^([^\w\s\$]+)=$/
798 0 0 $1 eq '_' || $1 eq '~' ? :
824 0 0 unless (defined $var)
857 0 0 if ($$node[0] eq 'FINAL')
858 0 0 if ($$node[4])
863 0 0 defined $$node[3] && uc $$node[3] ne 'DEFAULT' ? :
880 0 0 if defined $var
953 0 23411 if defined $$hash{$_}
957 0 1713 if defined $$hash{$_}
971 0 0 if not $conf and defined $conf
972 0 0 if ref $conf ne 'HASH'
978 0 0 unless ($handler)
985 0 0 if $prop =~ /^\w+$/ and $meth = $obj->can($prop)
989 0 0 defined $$conf{'Sortkeys'} ? :
990 0 0 $sort ? :
997 0 0 if (not $EntireStash or $$conf{'EntireStash'} or not defined $$conf{'EntireStash'})
1001 0 0 if $EntireStash
1004 0 0 unless defined $out
1007 0 0 $EntireStash ? :
1010 0 0 if ($$conf{'html'} or not defined $$conf{'html'} and $ENV{'REQUEST_METHOD'}) { }
1014 0 0 if (defined $out)
1018 0 0 if $$conf{'header'} or not defined $$conf{'header'}
1020 0 0 if $$conf{'header'} or not defined $$conf{'header'}