Branch Coverage

blib/lib/Template/Perlish.pm
Criterion Covered Total %
branch 116 148 78.3


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 0 1 exists $opts->{'missing'} ? :
1 6 unless $ref_wanted
261 9 159 if (my $key_ref = ref $key)
265 0 1 $ref_wanted ? :
1 8 if $key_ref ne $ref
268 0 8 if ($key_ref eq 'ARRAY') { }
8 0 elsif ($key_ref eq 'HASH') { }
280 2 3 $key =~ /\A (?: 0 | [1-9]\d*) \z/msx ? :
285 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') { }
286 0 1 $ref_wanted ? :
1 0 unless $method
309 0 0 $ref_wanted ? :
315 69 6 defined $$ref_to_value ? :
7 75 $ref_wanted ? :
333 74 2 $self->{'utf8'} ? :
334 67 9 $self->{'stdout'} ? :
358 67 9 if ($stdout) { }
372 74 2 if $utf8
375 1 75 if defined $self->{'binmode'}
392 67 9 if $stdout
395 74 2 if ($utf8)
408 74 2 if $outcome->{'sub'}
417 0 2 if ($line_no == $starter)
438 1 75 if (defined(my $custom = $self->{'functions'}))
493 1 1 if $start < 0
494 1 1 if $end > $#lines
497 2 9 $_ == $line_no ? :
505 34 106 unless $text =~ /[\n'\\]/msx
524 0 139 unless defined $input
527 1 138 unless length $input
547 27 111 unless defined $postpos
548 26 85 if $postpos != length $input and not $allow_partial
554 21 130 if ($part =~ /\G ($sq) /cgmsx) { }
16 114 elsif ($part =~ /\G ($dq) /cgmsx) { }
114 0 elsif ($part =~ /\G ($ud) /cgmsx) { }
572 2 83 if $allow_partial and wantarray