Branch Coverage

blib/lib/Template/Perlish.pm
Criterion Covered Total %
branch 120 144 83.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 85 $ref_wanted ? :
211 16 77 @_ && ref $_[-1] eq 'HASH' ? :
213 4 81 exists $opts->{'missing'} ? :
8 85 $ref_wanted ? :
218 1 1 $ref_wanted ? :
2 91 unless @_
220 0 91 unless defined $path_input
223 62 29 if (ref $path_input) { }
227 0 0 $ref_wanted ? :
0 29 if defined $path_input and not length $path_input
231 0 91 unless defined $crumbs
236 10 81 if ($use_method)
253 7 172 unless ($ref)
254 1 6 unless $ref_wanted
262 9 169 if (my $key_ref = ref $key)
266 1 8 if $key_ref ne $ref
269 0 8 if ($key_ref eq 'ARRAY') { }
8 0 elsif ($key_ref eq 'HASH') { }
281 2 3 $key =~ /\A (?: 0 | [1-9]\d*) \z/msx ? :
286 1 176 if ($is_blessed and $strict_blessed) { }
2 174 elsif ($method and $method_pre) { }
138 36 elsif ($ref eq 'HASH' and exists $$ref_to_value->{$key}) { }
17 19 elsif ($ref eq 'ARRAY' and exists $$ref_to_value->[$key]) { }
1 18 elsif ($method and $use_method) { }
11 7 elsif (not $ref_wanted) { }
5 2 elsif ($ref eq 'HASH') { }
2 0 elsif ($ref eq 'ARRAY') { }
287 1 0 unless $method
322 1 0 exists $opts->{'undef'} ? :
69 1 defined $$ref_to_value ? :
7 70 $ref_wanted ? :
338 74 2 $self->{'utf8'} ? :
339 67 9 $self->{'stdout'} ? :
363 67 9 if ($stdout) { }
377 74 2 if $utf8
380 1 75 if defined $self->{'binmode'}
397 67 9 if $stdout
400 74 2 if ($utf8)
413 74 2 if $outcome->{'sub'}
422 0 2 if ($line_no == $starter)
443 1 75 if (defined(my $custom = $self->{'functions'}))
498 1 1 if $start < 0
499 1 1 if $end > $#lines
502 2 9 $_ == $line_no ? :
510 34 106 unless $text =~ /[\n'\\]/msx
529 0 139 unless defined $input
532 1 138 unless length $input
552 27 111 unless defined $postpos
553 26 85 if $postpos != length $input and not $allow_partial
559 21 130 if ($part =~ /\G ($sq) /cgmsx) { }
16 114 elsif ($part =~ /\G ($dq) /cgmsx) { }
114 0 elsif ($part =~ /\G ($ud) /cgmsx) { }
577 2 83 if $allow_partial and wantarray