Branch Coverage

blib/lib/CPAN/Site/Index.pm
Criterion Covered Total %
branch 33 128 25.7


line true false branch
61 0 0 unless copy($from, $to)
69 0 0 exists $opts{'undefs'} ? :
71 0 0 unless ($ua)
73 0 0 if $opts{'env_proxy'}
76 0 0 unless -d $mycpan
106 0 0 if ($lazy and -f $details)
115 0 0 if $fallback
120 0 0 if (-f $details)
125 0 0 if (-f $newlist)
127 0 0 unless rename $newlist, $details
147 0 28 if (ref $this_version)
149 0 0 if ($@)
156 0 28 exists $CPAN::Site::Index::findpkgs->{$package} ? :
157 7 21 if $this_version
159 0 28 if defined $registered_version and $registered_version > $this_version
180 0 22 unless defined $subdir
183 21 1 unless not @rest
188 0 3 unless -f $fn and $fn =~ /$tar_gz/xi || $fn =~ /$zip/
192 0 3 if (defined $index_age and -M $fn > $index_age)
194 0 0 unless (exists $CPAN::Site::Index::olddists->{$dist})
210 3 0 if $fn =~ /$tar_gz/xi
213 0 0 if $fn =~ /$zip/
221 0 3 unless $arch->read($fn, 1)
227 24 20 unless $file->is_file and $fn =~ /\.pm$/i and &package_on_usual_location($fn)
237 0 0 unless $arch->read($fn) == 0
243 0 0 unless $member->isTextFile and &package_on_usual_location($fn)
246 0 0 unless $status == 0
262 0 4623 if /^__(?:END|DATA)__$/
264 324 4299 if /^=(\w+)/
265 1235 3388 if $in_pod or /^\s*#/
270 28 3360 if (/^\s* package \s* ((?:\w+\:\:)*\w+) (?:\s+ (\S*))? \s* [;{]/x)
273 0 28 if ($v)
275 0 0 if $@
280 8 20 if defined $package
287 0 3388 if (/^\s* \$ $package::VERSION \s* = \s* ["']?(\w+?)["']? \s* ;/x)
291 7 3381 if (not $VERSION and /^ (?:use\s+version\s*;\s*)? (?:our)? \s* \$ ((?: \w+\:\:)*) VERSION \s* \= (.*)/x)
293 0 7 unless defined $2
299 7 0 if (defined $VERSION)
300 3 4 if length $ns
307 0 20 if ref $VERSION
308 20 0 if defined $package
320 0 0 if -f $globdetails and -f $globdetails and -f $modlist and -M $globdetails < $cpan_update
336 0 0 if $response->is_success
352 0 0 if exists $pkgs->{$pkg}
362 0 0 unless my $fh = 'IO::Zlib'->new($filename, 'wb')
367 0 0 $lazy ? :
388 0 0 if not defined $version or $version eq ''
392 0 0 if $version eq 'undef' and not $undefs
405 0 0 unless &CPAN::Checksums::updatedir($dir)
412 0 0 unless -f $fn
415 0 0 unless my $fh = 'IO::Zlib'->new($fn, 'rb')
428 0 0 unless ($dist)
446 0 0 if (not -f $fn) { }
0 0 elsif (-M $fn < $newer) { }
459 0 0 if -d $dir
462 0 0 unless mkdir $dir, 493
472 0 0 unless @$mods
476 0 0 unless ($ua)
478 0 0 if $opts{'env_proxy'}
484 0 0 unless my $fh = 'IO::Zlib'->new($globdetails, 'rb')
488 0 0 if $line =~ /^\s*$/
494 0 0 unless delete $need{$pkg}
497 0 0 if (-f $to)
506 0 0 unless ($response->is_success)