Branch Coverage

lib/Parse/LocalDistribution.pm
Criterion Covered Total %
branch 46 104 44.2


line true false branch
16 20 0 if (ref $root eq ref {} and not $opts)
27 20 0 if ($root) { }
0 0 elsif (not $self->{'DISTROOT'}) { }
47 0 20 unless (@manifind)
58 0 20 if $self->{'META_CONTENT'}
63 0 0 if (length $a < length $b) { }
65 0 0 if (length $a < length $b) { }
70 0 8 if ($json and $yaml and length $json > length($yaml) + 1)
74 12 8 unless ($json or $yaml)
83 0 8 if (-l $metafile_abs) { }
8 0 elsif (-s $metafile_abs) { }
91 0 8 unless ($ok)
111 0 20 if (my $version_from_meta_ok = $self->_version_from_meta_ok)
114 0 0 if ($provides and "HASH" eq ref $provides)
118 20 0 if (not $indexing_method and @$pmfiles)
122 20 0 if ($indexing_method)
138 0 20 if ($pmfile_abs =~ m[/blib/])
148 15 0 if (not defined $result{$package} or $info->{$package}{'simile'})
152 0 15 if ($errs)
155 0 0 $_ =~ /infile|warning/ ? :
170 0 0 if ref $v ne ref {}
171 0 0 if not defined $v->{'file'} or $v->{'file'} eq ""
174 0 0 if (@stat) { }
179 0 0 unless (defined $v->{'version'})
188 0 0 unless $self->_examine_pkg({"package", $k, "pp", $v})
204 0 0 if (not $package =~ /^\w[\w\:\']*\w?\z/ && $package =~ /\w\z/ or $package =~ /:/ and not $package =~ /::/ or $package =~ /\w:\w/ or $package =~ /:::/)
218 0 0 if ($self->{'USERID'} and $self->{'PERMISSIONS'} and not $self->_perm_check($package))
231 0 0 if (not defined $_ or /^\s*$/ or /\s/)
235 0 0 unless $self->_version_ok($pp)
242 0 0 if length($pp->{'version'} || 0) > 16
253 80 24 unless $mf =~ /\.pm(?:\.PL)?$/i
263 4 20 if $inmf =~ m[^(?:x?t|inc|local|perl5|fatlib|examples?|ex|eg|demo)/]
265 8 12 if ($self->{'META_CONTENT'}) { }
268 8 0 if (ref $no_index eq 'HASH') { }
274 8 8 unless my $v = $no_index->{$k}
276 8 0 if (ref $v eq 'ARRAY') { }
280 0 16 if ($inmf =~ /^$ve$rest/) { }
289 0 0 if ($inmf =~ /^$v$rest/) { }
325 8 12 if @files
332 28 28 if -d $_
333 0 28 if $name =~ m[/(?:\.(?:svn|git)|blib)/]
336 4 24 if $skip and &$skip($rel)
352 12 8 unless -f $manifile
355 0 8 unless open my $fh, "<", $manifile
357 0 80 if /^\s*#/
360 0 80 if (($file, $comment) = /^'(\\[\\']|.+)+'\s*(.*)/) { }
366 0 80 unless $file
377 8 4 unless -f $skipfile
380 0 4 unless open my $fh, "<", $skipfile
386 0 4 if (defined $1)
390 0 4 unless defined $filename and $filename
393 0 4 unless @skip