Branch Coverage

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


line true false branch
146 0 11 unless (defined $plugin)
294 4 56 unless -e $item->{'name'}
295 2 54 if ($item->{'mark'} eq '/') { }
296 1 1 unless -d _
298 1 53 unless -f _
303 1 4 if (@errors)
335 1 0 if (&blessed($ex) and $ex->isa('Path::Tiny::Error')) { }
384 9 66 if ($line =~ / \A \s * (?: \# | \z ) /x)
406 15 48 if ($name =~ s/ \A ' ( . * ) ' \z /$1;/ex)
409 2 61 if (exists $files{$name})
428 3 61 unless ($line =~ / \A \s *+ # requires perl v5.10 ( $RE{'name'} ) (*PRUNE) # requires perl v5.10 (?: \s ++ ( $RE{'mark'} ) (*PRUNE) (?: \s ++ ( $RE{'comment'} ) ) ? ) ? \s * \z /x and do { my($name, $mark, $comment) = ($1, $2, $3); if ($name =~ s/ \A ' ( . * ) ' \z /$1;/ex) { $name =~ s/ \\ ( ['\\] ) /$1;/egx; } ; if (exists $files{$name}) { my $f = $files{$name}; $self->log_error(['%s at %s line %d', $name, $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 = {'name', $name, 'mark', $mark // '+', 'comment', $comment, 'line', $n}; $files{$name} = $file; push @files, $file; 1 })
435 1 5 if (@errors)