Branch Coverage

lib/WorePAN.pm
Criterion Covered Total %
branch 34 144 23.6


line true false branch
15 1 0 unless defined $args{'verbose'}
17 0 1 if ($args{'use_minicpan'})
18 0 0 unless eval { do { require CPAN::Mini } }
21 0 0 unless $local and -d $local
26 1 0 unless ($args{'root'})
27 0 1 $args{'tmp'} ? :
28 0 1 if $args{'verbose'}
32 0 1 if ($args{'use_backpan'})
35 1 0 if not defined $args{'no_network'} and $ENV{'HARNESS_ACTIVE'}
45 0 1 unless delete $$self{'files'}
46 0 1 unless ($$self{'no_network'})
47 0 0 if (my $dists = delete $$self{'dists'})
53 1 0 if (@files)
64 0 1 unless my $file = $self->_normalize('File::Spec'->catfile(@_))
89 0 0 unless $index->exists
92 0 0 unless my $fh = 'IO::Zlib'->new($index->path, 'rb')
97 0 0 if (/^\s*$/)
101 0 0 unless $done_preambles
114 0 0 if ($$self{'no_network'})
130 1 0 if (-f $file and $file =~ /\.(?:tar\.(?:gz|bz2)|tgz|zip)$/) { }
138 0 0 unless $file = $self->_normalize($file)
139 0 0 unless $dest = $self->__fetch($file)
147 0 1 if $^O eq 'MSWin32'
149 0 1 unless ($file =~ m[^([A-Z])/(\1[A-Z0-9_])/\2[A-Z0-9_\-]*/.+])
150 0 0 if ($file =~ m[^([A-Z])([A-Z0-9_])[A-Z0-9_\-]*/.+]) { }
163 0 0 unless ref $dists eq ref {}
174 0 0 $$dists{$_} ? :
179 0 0 unless ($$res{'success'})
184 0 0 if ($@)
192 0 0 $$_{'filename'} && $$_{'author'} ? :
204 0 4 if $$self{'verbose'}
211 0 0 if $dest->exists
215 0 0 if ($$self{'local_mirror'})
217 0 0 if ($source->exists)
224 0 0 unless ($$self{'no_network'})
228 0 0 if $$res{'success'}
229 0 0 if ($$self{'backpan'})
233 0 0 if $$res{'success'}
243 0 1 @_ == 1 && ref $_[0] eq ref sub { } ? :
254 4 1 if -d $archive_file
258 0 1 unless $basename =~ /\.(?:tar\.(?:gz|bz2)|tgz|zip)$/
259 0 1 if $basename =~ /^perl\-\d+/
260 0 1 if not $allow_dev_releases and $basename =~ /\d\.\d+_\d/ || $basename =~ /TRIAL/
266 0 1 $tmproot ? :
268 1 0 $tmpdir->children == 1 ? :
269 0 1 unless -d $basedir
280 0 1 if $$self{'no_indices'}
299 0 1 if $basedir->basename eq 'blib' or $basedir->subdir('blib')->exists
302 0 1 if ($permissions)
321 0 1 unless exists $$info{$module}{'version'}
323 1 0 unless ($$packages{$module})
329 0 0 if ('Parse::PMFile'->_vgt($new_version, $cur_version)) { }
0 0 elsif ('Parse::PMFile'->_vgt($cur_version, $new_version)) { }
336 0 0 if ($new_version eq 'undef' or $new_version == 0 or 'Parse::PMFile'->_vcmp($new_version, $cur_version) == 0)
340 0 0 if ($mtime >= $$packages{$module}[2])
345 0 0 if ($ok)
371 0 1 unless my $fh = 'IO::Zlib'->new($index->path, 'wb')
384 0 1 unless my $fh = 'IO::Zlib'->new($index->path, 'wb')
388 0 0 unless $$a[0] cmp $$b[0]
390 1 0 defined $$packages{$pkg}[0] ? :
391 0 1 if (length $pkg > $first)
408 0 0 unless defined $package
411 0 0 if (/^$package\s+(\S+)\s+(\S+)$/)
412 0 0 wantarray ? :
426 0 0 unless $id
454 0 0 unless /^(\S+)\s+(\S+)\s+(\S+)/
455 0 0 $2 eq 'undef' ? :
465 0 0 unless /^\S+\s+\S+\s+(\S+)/
477 0 0 unless $self->files
479 0 0 unless my $name = $dist->dist
480 0 0 if (not exists $dists{$name} or 'Parse::PMFile'->_vlt($dists{$name}->version, $dist->version))
492 1 0 if ($$self{'cleanup'} and $$ == $$self{'pid'})