Branch Coverage

blib/lib/Dist/Zilla/Plugin/Manifest/Read.pm
Criterion Covered Total %
branch 24 26 92.3


line true false branch
146 0 9 unless (defined $plugin)
233 4 55 unless -e $item->{'filename'}
234 2 53 if ($item->{'mark'} eq '/') { }
235 1 1 unless -d _
237 1 52 unless -f _
238 46 6 if ($item->{'mark'} ne '-')
244 1 4 if (@errors)
301 1 0 if (&blessed($ex) and $ex->isa('Path::Tiny::Error')) { }
350 9 65 if ($line =~ / \A \s * (?: \# | \z ) /x)
372 15 47 if ($filename =~ s/ \A ' ( . * ) ' \z /$1;/ex)
375 2 60 if (exists $files{$filename})
394 3 60 unless ($line =~ / \A \s *+ # requires perl v5.10 ( $RE{'filename'} ) (*PRUNE) # requires perl v5.10 (?: \s ++ ( $RE{'mark'} ) (*PRUNE) (?: \s ++ ( $RE{'comment'} ) ) ? ) ? \s * \z /x and do { my($filename, $mark, $comment) = ($1, $2, $3); if ($filename =~ s/ \A ' ( . * ) ' \z /$1;/ex) { $filename =~ s/ \\ ( ['\\] ) /$1;/egx; } ; if (exists $files{$filename}) { my $f = $files{$filename}; $self->log_error(['%s at %s line %d', $filename, $manifest, $n]); $self->log_error([' also listed at %s line %d.', $manifest, $f->{'line'}]); push @errors, $n, 'The file also listed at line ' . $f->{'line'} . '.', $f->{'line'}, 'The file also listed at line ' . $n . '.'; next; } ; my $file = {'filename', $filename, 'mark', $mark // '+', 'comment', $comment, 'line', $n}; $files{$filename} = $file; push @files, $file; 1 })
401 1 5 if (@errors)