Branch Coverage

blib/lib/CPAN/Reporter/Smoker.pm
Criterion Covered Total %
branch 76 114 66.6


line true false branch
100 1 28 if @_ % 2
106 11 16 unless $spec{$key} and $spec{$key}{'is_valid'}->($value)
111 12 5 if $ENV{'PERL_CR_SMOKER_SHORTCUT'}
125 5 0 unless ($init_cpan++)
151 3 7 if ($args{'list'}) { }
153 2 1 if (ref $args{'list'} eq 'ARRAY') { }
158 0 1 unless open my $list_fh, '<', $args{'list'}
176 1 9 if ($args{'reverse'})
181 0 10 if ($args{'random'})
187 0 10 if ($CPAN::Config->{'build_dir_reuse'} and $CPAN::META->can('reset_tested'))
195 0 10 if ($args{'force_trust'})
209 16 18 if ($seen{$base}++) { }
0 18 elsif ($args{'filter'} and $args{'filter'}->($dist)) { }
0 18 elsif ('CPAN::Distribution'->new(%{$dist;})->prefs->{'disabled'}) { }
228 18 0 if ($args{'set_term_title'})
234 18 0 if ($status_fh)
243 0 18 $args{'install'} ? :
247 0 18 if ($? & 127)
252 0 18 if ($args{'_hook_after_test'})
257 18 0 if -f $args{'status_file'}
260 0 18 if ($dists_tested >= $args{'clean_cache_after'})
264 0 18 if (time - $history_loaded_at > $args{'reload_history_period'})
270 5 13 if time - $loop_start_time > $args{'restart_delay'}
272 5 0 if $ENV{'PERL_CR_SMOKER_RUNONCE'}
273 0 0 if $args{'list'}
276 0 0 if ($delay > 0)
295 5 5 if ($CPAN::META->{'cachemgr'}) { }
306 0 0 if ($sig =~ /\d+/)
312 0 0 if defined $ENV{'PERL_CR_SMOKER_CURRENT'}
317 0 0 unless substr(lc $answer, 0, 1) eq 'y'
335 0 14 unless (-r $actual_local)
424 0 10 unless my $gz = &Compress::Zlib::gzopen($packages, 'rb')
429 90 91 if ($inheader)
430 10 80 unless /\S/
439 9 82 if $base_id =~ /$re{'perls'}/
442 18 64 if $base_id =~ /$re{'mod_perl'}/
445 9 55 if $module =~ /$re{'bundle'}/
449 55 0 if ($base_name)
466 0 322 unless ($stat{'name'} and $stat{'perms'} and $stat{'datetime'})
470 165 157 if $stat{'perms'} eq 'l' or substr($stat{'perms'}, 0, 1) eq 'd'
471 45 112 unless $stat{'name'} =~ /$re{'target_dir'}/
472 16 96 unless $stat{'name'} =~ /$re{'archive'}/
474 6 90 if $start_from_timestamp and $stat{'datetime'} < $start_from_timestamp
479 0 90 unless $base_id
481 0 90 if $base_id =~ /$re{'perls'}/
484 7 83 if $base_id =~ m[\A\w+/Perl6/]
491 50 33 if ($valid_distros{$base_id}) { }
493 0 50 unless $base_name
494 50 0 if ($stat{'datetime'} > $latest{$base_name}{'datetime'})
505 0 33 unless defined $base_name
508 9 24 unless $latest{$base_name}
510 6 18 if $skip_dev_versions
514 18 0 if ($stat{'datetime'} > $latest_dev{$base_name}{'datetime'})
523 9 1 unless ($start_from_timestamp)
529 0 49 unless $mirror{$base_id}
537 0 14 unless ($latest{$name})
540 1 13 if $latest{$name}{'datetime'} > $latest_dev{$name}{'datetime'}