Branch Coverage

blib/lib/Dist/Metadata/Dist.pm
Criterion Covered Total %
branch 44 54 81.4


line true false branch
25 0 90 @_ == 1 ? :
32 5 85 if $req and not $self->{$req}
34 12 73 if (exists $self->{'file_spec'})
37 10 2 if $self->{'file_spec'}
40 3 9 unless $self->{'file_spec'}
78 2 35 unless @files
95 0 57 unless open my $fh, '>', $full_path
103 36 1 wantarray ? :
137 44 175 unless exists $self->{'file_spec'}
146 38 64 unless my $root = $self->root
150 0 64 if $file =~ m[^\Q$root\E[\\/]]
170 59 46 unless $self->{'_list_files'}
186 68 60 unless exists $self->{$method}
200 65 0 $self->path_class_file->new($_)->is_absolute ? :
42 0 if @files
228 76 39 if ($path)
230 54 22 if $path =~ m[ ([^\\/]+) # name (anything below final directory) - # separator (v?[0-9._]+) # version (?: # possible file extensions \.t(?:ar\.)?gz )? $ ]x
250 46 30 unless $dnifile =~ /\.[a-z]\w+$/
256 76 0 if ($dni_name and $dni_version or not $name)
257 76 0 if $dni_name
258 63 13 if $dni_version
261 0 76 if $@
302 0 59 unless @files
307 27 32 unless $files[0] =~ m[^([^\\/]+)[\\/]]
317 0 98 unless m[^\Q$dir\E[\\/](.+)$]
337 12 181 unless exists $self->{'root'}
349 87 143 if not exists $$self{$fields[$i]} and defined $values[$i]