Branch Coverage

blib/lib/Module/Plan/Base.pm
Criterion Covered Total %
branch 26 64 40.6


line true false branch
49 36 0 unless ref $inc
85 2 0 unless ($self->no_inject)
88 0 2 unless (_INSTANCE $$self{'inject'}, 'CPAN::Inject')
103 0 2 unless my $p5i = shift()
104 0 2 unless -e $p5i
105 0 2 unless -f _
106 0 2 unless -r _
118 0 2 unless open CFG, $p5i
126 0 2 unless (_CLASS $header)
132 0 2 unless ($header->VERSION and $header->isa($class))
201 0 0 $_[0]->can('ref') ? :
218 0 0 unless my $file = _STRING(shift())
225 0 0 if (scalar grep({$name eq $_;} @{$$self{'names'};}))
238 0 4 unless my $uri = _INSTANCE(shift(), 'URI')
239 0 4 unless ($uri->can('path'))
248 0 4 if (scalar grep({$name eq $_;} @{$$self{'names'};}))
267 0 2 unless ($uri)
273 0 2 if (-f $file)
281 0 2 unless (defined $content)
286 0 2 unless (open DOWNLOAD, '>', $file)
290 0 2 unless (print DOWNLOAD $content)
293 0 2 unless (close DOWNLOAD)
304 0 0 unless ($file)
318 0 0 unless ($distro)
330 0 0 unless ($uri)
341 2 0 _STRING($_[1]) ? :
0 2 _INSTANCE($_[1], 'URI') ? :
0 2 unless my $uri = _INSTANCE($_[1], 'URI') ? $_[1] : (_STRING($_[1]) ? 'URI'->new($_[1]) : undef)
347 2 0 unless ($uri->scheme)
349 0 2 unless $uri = 'URI::file'->new($uri->as_string)
353 2 0 if ($uri->isa('URI::file'))
362 0 2 unless my $uri = _INSTANCE($_[1], 'URI')