Branch Coverage

blib/lib/Mustache/Simple.pm
Criterion Covered Total %
branch 76 96 79.1


line true false branch
232 0 98 @_ == 1 ? :
262 13 250 if ($tag{'type'} eq '=')
271 15 107 if @tags == 0
274 74 82 if $tags[$_ - 1]{'type'} =~ m[^[#/^]$]
276 57 50 if (@tags > 1)
278 3 54 if $tags[0]{'type'} eq '=' and $tags[0]{'pre'} =~ /^\s*$/
282 7 256 if $tags[$_]{'type'} =~ /^[!]$/
283 13 250 if $tags[$_]{'type'} =~ /^[=]$/
286 55 52 if $tags[$#tags]{'type'} =~ m[^[/!]$]
298 11 0 if ref $self->partial eq 'CODE'
327 10 127 if ($tag->{'txt'} eq '.') { }
21 106 elsif ($tag->{'txt'} =~ /\./) { }
338 103 3 if (defined $txt) { }
340 8 95 if (ref $txt eq 'CODE')
349 0 3 if $self->throw
353 8 129 if $tag->{'tab'}
354 23 114 $tag->{'type'} ? :
361 70 206 if ($tag->{'txt'} eq $tags[$j]{'txt'})
363 2 68 if $tags[$j]{'type'} eq '#'
364 68 0 if ($tags[$j]{'type'} eq '/')
366 2 66 if $nested--
371 0 66 if $j == @tags
374 3 63 if ($tag->{'txt'} =~ /\./) { }
382 0 63 if (scalar @ret == 0) { }
63 0 elsif (scalar @ret == 1) { }
399 5 33 unless scalar %$txt
403 12 5 if $txt
413 24 5 if ($tag->{'txt'} eq $tags[$j]{'txt'})
415 2 22 if $tags[$j]{'type'} eq '^'
416 22 0 if ($tags[$j]{'type'} eq '/')
418 2 20 if $nested--
423 0 20 if $j == @tags
426 3 17 if ($tag->{'txt'} =~ /\./) { }
438 1 1 if @$txt == 0
441 0 1 if keys %$txt == 0
450 13 3 unless $txt
453 0 20 if $tag->{'tab'}
503 1 13 if $filename =~ /\r?\n/
505 0 13 if (ref $path and ref $path eq 'ARRAY') { }
510 0 0 if $fullfile
515 13 0 unless -e $fullfile
573 0 53 unless $ok{$name}
574 0 53 if $value
605 1 121 unless $file
606 107 14 if $file =~ /\{\{/
610 14 0 unless $filepath
612 0 0 unless open my $hand, '<:utf8', $filepath
657 24 98 unless $context