Branch Coverage

blib/lib/Dist/Zilla/Plugin/InsertExample.pm
Criterion Covered Total %
branch 28 34 82.3


line true false branch
45 8 0 if ($content =~ s/^#\s*EXAMPLE:\s*(.*)\s*$/$self->_slurp_example($1) . "\n";/egmu)
56 6 2 if (my $file = &first(sub {
2 0 elsif ($file = $self->zilla->root->child($filename)) { }
59 0 6 unless open $fh, "<", \$content
65 0 2 unless -r $file
75 14 6 if ($self->remove_boiler)
77 9 5 if (@{$self->matches_boiler_barrier}) { }
79 7 2 if ($in_boiler)
81 1 6 if &any(sub {
87 1 4 if $line =~ /^\s*$/u
88 1 3 if $line =~ m[^#!/usr/bin/perl]u
89 0 3 if $line =~ m[^#!/usr/bin/env perl]u
90 1 2 if $line =~ /^use strict;$/u
91 1 1 if $line =~ /^use warnings;$/u
93 0 3 if eof $fh
96 1 8 if $line =~ /^\s*$/u and not $found_content
99 6 2 defined $rest ? :