Branch Coverage

blib/lib/App/Cpan.pm
Criterion Covered Total %
branch 15 200 7.5


line true false branch
406 1 3 if $ARGV[0] eq 'install' and @ARGV > 1
416 1 0 if (0 == @ARGV) { }
429 0 0 if ($options->{'j'}) { }
444 0 0 if $options->{'T'}
448 0 0 unless exists $options->{$o}
453 0 0 if ($options->{'o'})
475 0 0 unless $option_count
483 0 0 unless defined $ENV{'NONINTERACTIVE_TESTING'}
484 0 0 unless defined $ENV{'PERL_MM_USE_DEFAULT'}
522 0 0 unless $options->{$option}
528 0 0 unless (ref $sub eq ref sub { } )
534 0 0 if @ARGV and not $takes_args
553 38 0 if $autoload =~ /^(debug|trace)$/
566 0 2 if $INC[-1] eq '.'
575 2 0 unless ($log4perl_loaded)
608 0 0 if $option eq 'f' or $option eq 'T'
609 0 0 unless $options->{$option}
617 0 0 if (not $switch and @$args) { }
0 0 elsif (not $switch || @$args) { }
0 0 elsif ($switch and not @$args) { }
624 0 0 unless 'CPAN::Shell'->can($method)
628 0 0 if ($options->{'f'}) { }
0 0 elsif ($options->{'T'}) { }
636 0 0 unless $options->{'x'}
641 0 0 unless (my $module = _expand_module($arg))
650 0 0 if $error
654 0 0 if (@errors) { }
719 0 29 if ($] < 5.008) { }
734 9 305 if ($lines[-1] =~ /$regex/)
758 0 9 if $last_line =~ /\b(?:Cannot\s+install)\b/i
760 4 5 unless $result
769 5 4 unless $result
774 0 0 if _cpanpm_output_indicates_failure() or _cpanpm_output_indicates_success()
824 0 0 if ($CPAN::Config->{'connect_to_internet_ok'})
826 0 0 unless eval { do { 'CPAN::FTP'->localize('MIRRORED.BY', 'File::Spec'->catfile($CPAN::Config->{'keep_source_where'}, 'MIRRORED.BY'), 3, 1) } }
860 0 0 if (@custom_dirs)
881 0 0 unless @{$tuple->[1];}
907 0 3 unless _home_of($1 || $>)
916 0 0 unless my $ent = User::pwent::getpw($user)
942 0 0 unless _is_pingable_scheme($obj)
961 0 0 if (-e $local_path) { }
981 0 0 unless eval { do { $mirror->can('http') } }
994 0 0 -w $dir ? :
1004 0 0 $rtt ? :
1015 0 0 ref $mirror ? :
1020 0 0 if ($url->scheme eq 'file')
1026 0 0 unless $port
1028 0 0 if ($ping->can('port_number')) { }
1035 0 0 if $ping->can('hires')
1037 0 0 $alive ? :
1045 0 0 unless ($rc)
1057 0 0 unless ($_[0])
1108 0 0 file_name_is_absolute($argument) ? :
1109 0 0 unless -e $file
1123 0 0 unless $rc
1167 0 0 unless my $module = _expand_module($arg)
1187 0 0 unless $loaded
1199 0 0 if 200 <= $status_code and $status_code <= 300
1211 0 0 unless $loaded
1229 0 0 unless -e $git
1230 0 0 unless -x $git
1251 0 0 unless my $module = _expand_module($arg)
1255 0 0 unless eval { do { $module->inst_file } }
1272 0 0 unless _safe_load_module('LWP::Simple') and _safe_load_module('URI')
1278 0 0 if defined $content
1299 0 0 unless my $module = _expand_module($arg)
1301 0 0 unless ($module)
1309 0 0 unless $module->userid
1324 0 0 unless my $module = _expand_module($arg)
1327 0 0 unless $module->userid
1330 0 0 $module->description ? :
0 0 $module->cpan_file ? :
0 0 $module->inst_file ? :
0 0 $module->inst_version ? :
0 0 $module->uptodate ? :
1350 0 0 if $modules
1364 0 0 unless $module = _expand_module($module)
1365 0 0 unless $module->inst_file
1366 0 0 if $module->uptodate
1367 0 0 $module->inst_version ? :
1385 0 0 unless exists $hash{lc $module->userid}
1412 0 0 unless defined $module_name
1427 0 0 if /\A\w+\.pm\z/
1440 0 0 unless open FILE, "<$file"
1447 0 0 /^=cut/ ? :
0 0 /^=(?!cut)/ ? :
1448 0 0 if $in_pod or /^\s*#/
1450 0 0 unless /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/
1458 0 0 unless defined $version
1490 0 0 if length $path < length $inc
1510 0 0 if $expanded
1512 0 0 unless (defined $expanded)
1521 0 0 if (defined $guesses and @$guesses)
1582 0 0 unless (defined $distance)
1584 0 0 unless $can_guess = eval "require $try->[0]; 1"
1586 0 0 unless $try->[-1]
1594 0 0 unless ($distance)
1595 0 0 unless ($shown_help)
1600 0 0 if ($can_guess) { }
1618 0 0 if $distance > $_threshold