Branch Coverage

blib/lib/App/Cpan.pm
Criterion Covered Total %
branch 14 188 7.4


line true false branch
404 1 3 if $ARGV[0] eq 'install' and @ARGV > 1
414 1 0 if (0 == @ARGV) { }
427 0 0 if ($options->{'j'}) { }
442 0 0 if $options->{'T'}
446 0 0 unless exists $options->{$o}
451 0 0 if ($options->{'o'})
473 0 0 unless $option_count
481 0 0 unless defined $ENV{'NONINTERACTIVE_TESTING'}
482 0 0 unless defined $ENV{'PERL_MM_USE_DEFAULT'}
520 0 0 unless $options->{$option}
526 0 0 unless (ref $sub eq ref sub { } )
532 0 0 if @ARGV and not $takes_args
558 0 2 if $INC[-1] eq '.'
567 2 0 unless ($log4perl_loaded)
600 0 0 if $option eq 'f' or $option eq 'T'
601 0 0 unless $options->{$option}
609 0 0 if (not $switch and @$args) { }
0 0 elsif (not $switch || @$args) { }
0 0 elsif ($switch and not @$args) { }
616 0 0 unless 'CPAN::Shell'->can($method)
620 0 0 if ($options->{'f'}) { }
0 0 elsif ($options->{'T'}) { }
631 0 0 unless (my $module = _expand_module($arg))
640 0 0 if $error
644 0 0 if (@errors) { }
709 0 29 if ($] < 5.008) { }
724 9 305 if ($lines[-1] =~ /$regex/)
748 0 9 if $last_line =~ /\b(?:Cannot\s+install)\b/i
750 4 5 unless $result
759 5 4 unless $result
764 0 0 if _cpanpm_output_indicates_failure() or _cpanpm_output_indicates_success()
814 0 0 if ($CPAN::Config->{'connect_to_internet_ok'})
816 0 0 unless eval { do { 'CPAN::FTP'->localize('MIRRORED.BY', 'File::Spec'->catfile($CPAN::Config->{'keep_source_where'}, 'MIRRORED.BY'), 3, 1) } }
850 0 0 if (@custom_dirs)
871 0 0 unless @{$tuple->[1];}
897 0 3 unless _home_of($1 || $>)
906 0 0 unless my $ent = User::pwent::getpw($user)
932 0 0 unless _is_pingable_scheme($obj)
951 0 0 if (-e $local_path) { }
971 0 0 unless eval { do { $mirror->can('http') } }
984 0 0 -w $dir ? :
994 0 0 $rtt ? :
1005 0 0 ref $mirror ? :
1010 0 0 if ($url->scheme eq 'file')
1016 0 0 unless $port
1018 0 0 if ($ping->can('port_number')) { }
1025 0 0 if $ping->can('hires')
1027 0 0 $alive ? :
1035 0 0 unless ($rc)
1047 0 0 unless ($_[0])
1101 0 0 unless -e $file
1111 0 0 unless $rc
1155 0 0 unless my $module = _expand_module($arg)
1175 0 0 unless $loaded
1186 0 0 if LWP::Simple::getstore($fetch_path, $store_path)
1197 0 0 unless $loaded
1215 0 0 unless -e $git
1216 0 0 unless -x $git
1237 0 0 unless my $module = _expand_module($arg)
1241 0 0 unless eval { do { $module->inst_file } }
1258 0 0 unless _safe_load_module('LWP::Simple') and _safe_load_module('URI')
1264 0 0 if defined $content
1285 0 0 unless my $module = _expand_module($arg)
1287 0 0 unless ($module)
1295 0 0 unless $module->userid
1310 0 0 unless my $module = _expand_module($arg)
1313 0 0 unless $module->userid
1316 0 0 $module->description ? :
0 0 $module->cpan_file ? :
0 0 $module->inst_file ? :
0 0 $module->inst_version ? :
0 0 $module->uptodate ? :
1336 0 0 if $modules
1350 0 0 unless $module = _expand_module($module)
1351 0 0 unless $module->inst_file
1352 0 0 if $module->uptodate
1353 0 0 $module->inst_version ? :
1371 0 0 unless exists $hash{lc $module->userid}
1398 0 0 unless defined $module_name
1413 0 0 if /\A\w+\.pm\z/
1426 0 0 unless open FILE, "<$file"
1433 0 0 /^=cut/ ? :
0 0 /^=(?!cut)/ ? :
1434 0 0 if $in_pod or /^\s*#/
1436 0 0 unless /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/
1444 0 0 unless defined $version
1476 0 0 if length $path < length $inc
1496 0 0 if $expanded
1498 0 0 unless (defined $expanded)
1507 0 0 if (defined $guesses and @$guesses)
1560 0 0 unless (defined $distance)
1562 0 0 unless my $can_guess = eval "require $try->[0]; 1"
1570 0 0 unless ($distance)
1584 0 0 if $distance > $threshold