Branch Coverage

blib/lib/Template/Perlish.pm
Criterion Covered Total %
branch 115 146 78.7


line true false branch
20 0 5 unless grep {$sub eq $_;} "crumble", "render", "traverse"
35 13 5 if (@rest)
36 13 0 ref $rest[0] ? :
37 1 12 if @rest
73 0 28 if (@_ == 1) { }
28 0 elsif (scalar(@_) % 2 == 0) { }
79 0 4 if ($key eq '-preset') { }
81 0 0 unless exists $preset_for{$value}
96 27 1 unless exists $external{$inhibitor}
112 0 73 unless exists $compiled->{'sub'}
119 0 76 if $args{'no_check'}
135 74 2 if $self->{'utf8'}
143 56 87 if $start < 0
145 64 23 if $start > $pos
156 0 87 if ($stop < 0)
165 83 4 if (length $code)
166 32 51 if (my $path = crumble($code)) { }
0 51 elsif (my($scalar) = $code =~ /\A\s* (\$ [[:alpha:]_]\w*) \s*\z/msx) { }
24 27 elsif (substr($code, 0, 1) eq '=') { }
208 8 79 $ref_wanted ? :
211 10 77 @_ && ref $_[-1] eq 'HASH' ? :
216 1 1 $ref_wanted ? :
2 85 unless @_
218 0 0 $ref_wanted ? :
0 85 unless defined $path_input
221 56 29 if (ref $path_input) { }
225 0 0 $ref_wanted ? :
0 29 if defined $path_input and not length $path_input
229 0 0 $ref_wanted ? :
0 85 unless defined $crumbs
234 10 75 if ($use_method)
251 7 162 unless ($ref)
252 1 6 unless $ref_wanted
260 9 159 if (my $key_ref = ref $key)
264 0 1 $ref_wanted ? :
1 8 if $key_ref ne $ref
267 0 8 if ($key_ref eq 'ARRAY') { }
8 0 elsif ($key_ref eq 'HASH') { }
279 2 3 $key =~ /\A (?: 0 | [1-9]\d*) \z/msx ? :
284 1 166 if ($is_blessed and $strict_blessed) { }
2 164 elsif ($method and $method_pre) { }
134 30 elsif ($ref eq 'HASH' and exists $$ref_to_value->{$key}) { }
17 13 elsif ($ref eq 'ARRAY' and exists $$ref_to_value->[$key]) { }
1 12 elsif ($method and $use_method) { }
10 2 elsif ($ref eq 'HASH') { }
2 0 elsif ($ref eq 'ARRAY') { }
285 0 1 $ref_wanted ? :
1 0 unless $method
308 0 0 $ref_wanted ? :
314 69 6 defined $$ref_to_value ? :
7 75 $ref_wanted ? :
332 74 2 $self->{'utf8'} ? :
333 67 9 $self->{'stdout'} ? :
357 67 9 if ($stdout) { }
371 74 2 if $utf8
374 1 75 if defined $self->{'binmode'}
391 67 9 if $stdout
394 74 2 if ($utf8)
407 74 2 if $outcome->{'sub'}
416 0 2 if ($line_no == $starter)
437 1 75 if (defined(my $custom = $self->{'functions'}))
492 1 1 if $start < 0
493 1 1 if $end > $#lines
496 2 9 $_ == $line_no ? :
504 34 106 unless $text =~ /[\n'\\]/msx
523 0 139 unless defined $input
526 1 138 unless length $input
546 27 111 unless defined $postpos
547 26 85 if $postpos != length $input and not $allow_partial
553 21 130 if ($part =~ /\G ($sq) /cgmsx) { }
16 114 elsif ($part =~ /\G ($dq) /cgmsx) { }
114 0 elsif ($part =~ /\G ($ud) /cgmsx) { }
571 2 83 if $allow_partial and wantarray