Branch Coverage

blib/lib/CPAN/Index.pm
Criterion Covered Total %
branch 59 172 34.3


line true false branch
48 0 93 unless $_ and $_ > 0.001
55 1 92 unless ($$CPAN::META{'PROTOCOL'})
59 1 92 if ($$CPAN::META{'PROTOCOL'} < PROTOCOL())
63 92 1 if ($CPAN::Index::LAST_TIME + $$CPAN::Config{'index_expire'} * 86400 > $time and not $force) { }
81 0 3 $needshort ? :
86 0 3 if ($CPAN::DEBUG)
91 0 3 if $CPAN::Signal
94 0 1 if ($CPAN::DEBUG)
99 0 1 if $CPAN::DEBUG
101 0 93 if ($$CPAN::Config{'build_dir_reuse'})
104 0 93 if (CPAN::_sqlite_running())
105 0 0 unless $CPAN::Index::LAST_TIME
115 0 0 unless ($CPAN::META->has_inst($$CPAN::Config{'yaml_module'} || 'YAML'))
118 0 0 if $CPAN::Index::HAVE_REANIMATED++
121 0 0 unless opendir $dh, $d
129 0 0 if /(.+)\.yml$/
131 0 0 if (@candidates) { }
132 0 0 @candidates == 1 ? :
141 0 0 if ($@)
146 0 0 if ($c and $$c{'perl'} and $$c{'distribution'} and 'CPAN'->_perl_fingerprint($$c{'perl'}))
149 0 0 if ($$c{'distribution'}{$k} and ref $$c{'distribution'}{$k} and UNIVERSAL::isa($$c{'distribution'}{$k}, 'CPAN::Distrostatus'))
177 0 0 if ($do->can('tested_ok_but_not_installed'))
178 0 0 if ($do->tested_ok_but_not_installed) { }
214 0 3 if (-f $abs_wanted and -M $abs_wanted < $$CPAN::Config{'index_expire'} and not $force & 1) { }
219 0 0 $$CPAN::Config{'index_expire'} == 1 ? :
232 0 1 unless defined $index_target
233 0 1 if CPAN::_sqlite_running()
247 2 0 if ($userid and $fullname and $email) { }
251 0 0 if $CPAN::DEBUG
258 0 2 if $CPAN::Signal
265 0 19 unless defined $dist
273 0 1 unless defined $index_target
274 0 1 if CPAN::_sqlite_running()
278 0 1 if $CPAN::DEBUG
285 0 1 if $CPAN::DEBUG
291 1 8 if $shift =~ /^\s*$/
292 1 7 if $shift =~ /^Line-Count:\s+(\d+)/
293 1 7 if $shift =~ /^Last-Updated:\s+(.+)/
295 0 1 if $CPAN::DEBUG
297 0 1 if (not defined $line_count) { }
0 1 elsif ($line_count != scalar @lines) { }
315 0 1 if (not defined $last_updated) { }
332 1 0 if ($CPAN::META->has_inst('HTTP::Date')) { }
340 0 0 $d[1] >= 0 ? :
343 1 0 if ($age > 30) { }
0 0 elsif ($age < -1) { }
372 0 1 if $CPAN::DEBUG
381 0 19 unless ($mod and defined $version and $dist)
385 0 0 if ($errors++ >= 5)
392 0 19 if ($mod eq 'CPAN' and not 'CPAN::Queue'->exists('Bundle::CPAN') || 'CPAN::Queue'->exists('CPAN')) { }
1 18 elsif ($mod =~ /^Bundle::(.*)/) { }
399 0 0 if ($version > $CPAN::VERSION)
413 0 0 if $CPAN::Signal
418 1 18 if ($bundle) { }
438 19 0 if ($id->cpan_file ne $dist or $id->cpan_version ne $version)
451 1 18 if ($CPAN::META->exists('CPAN::Distribution', $dist)) { }
467 0 19 if ($secondtime)
478 0 19 if $CPAN::Signal
481 0 1 if ($secondtime)
484 0 0 if exists $exists{$$o{'ID'}}
496 0 1 unless defined $index_target
497 0 1 if CPAN::_sqlite_running()
510 0 1 if ($shift =~ /^Date:\s+(.*)/)
511 0 0 if ($CPAN::Index::DATE_OF_03 eq $1)
517 1 0 if $shift =~ /^\s*$/
523 0 1 if $CPAN::DEBUG
525 0 1 if $@
526 0 1 if $CPAN::Signal
530 0 1 if $CPAN::DEBUG
540 0 0 if $CPAN::Signal
548 1 0 unless $$CPAN::Config{'cache_metadata'}
549 0 0 if CPAN::_sqlite_running()
550 0 0 unless $CPAN::META->has_usable('Storable')
562 0 0 if $@
568 1 0 unless $$CPAN::Config{'cache_metadata'}
569 0 0 if CPAN::_sqlite_running()
570 0 0 unless $CPAN::META->has_usable('Storable')
572 0 0 unless -r $metadata_file and -f $metadata_file
576 0 0 if $@
577 0 0 unless ($cache and UNIVERSAL::isa($cache, 'HASH'))
581 0 0 if (exists $$cache{'PROTOCOL'}) { }
582 0 0 if (PROTOCOL() > $$cache{'PROTOCOL'})
598 0 0 unless $class =~ /^CPAN::/
607 0 0 unless ($clcnt)
611 0 0 if ($idcnt < 1000)
621 0 0 if defined $CPAN::Index::DATE_OF_02