Branch Coverage

blib/lib/App/Cpan.pm
Criterion Covered Total %
branch 12 142 8.4


line true false branch
338 1 3 if $ARGV[0] eq 'install' and @ARGV > 1
348 1 0 if (0 == @ARGV) { }
361 0 0 if ($$options{'j'}) { }
378 0 0 unless exists $$options{$o}
383 0 0 if ($$options{'o'})
401 0 0 unless $option_count
438 0 0 unless $$options{$option}
444 0 0 unless (ref $sub eq ref sub { } )
450 0 0 if @ARGV and not $takes_args
474 2 0 unless ($log4perl_loaded)
507 0 0 if $option eq 'f'
508 0 0 unless $$options{$option}
516 0 0 if (not $switch and @$args) { }
0 0 elsif (not $switch || @$args) { }
0 0 elsif ($switch and not @$args) { }
523 0 0 unless 'CPAN::Shell'->can($method)
527 0 0 if ($$options{'f'}) { }
540 0 0 if $error
544 0 0 if (@errors) { }
617 9 305 if ($lines[-1] =~ /$regex/)
641 0 9 if $last_line =~ /\b(?:Cannot\s+install)\b/i
643 4 5 unless $result
652 5 4 unless $result
657 0 0 if _cpanpm_output_indicates_failure() or _cpanpm_output_indicates_success()
707 0 0 if ($$CPAN::Config{'connect_to_internet_ok'})
709 0 0 unless eval { do { 'CPAN::FTP'->localize('MIRRORED.BY', 'File::Spec'->catfile($$CPAN::Config{'keep_source_where'}, 'MIRRORED.BY'), 3, 1) } }
744 0 0 if (@custom_dirs)
765 0 0 unless @{$$tuple[1];}
791 0 3 unless _home_of($1 || $>)
800 0 0 unless my $ent = User::pwent::getpw($user)
826 0 0 unless _is_pingable_scheme($obj)
847 0 0 if (-e $local_path) { }
862 0 0 unless eval { do { $mirror->can('http') } }
875 0 0 -w $dir ? :
886 0 0 $rtt ? :
895 0 0 ref $mirror ? :
900 0 0 if ($url->scheme eq 'file')
906 0 0 unless $port
908 0 0 if ($ping->can('port_number')) { }
915 0 0 if $ping->can('hires')
917 0 0 $alive ? :
925 0 0 unless ($rc)
937 0 0 unless ($_[0])
982 0 0 unless -e $file
992 0 0 unless $rc
1052 0 0 unless $loaded
1063 0 0 if LWP::Simple::getstore($fetch_path, $store_path)
1074 0 0 unless $loaded
1094 0 0 unless -e $git
1095 0 0 unless -x $git
1119 0 0 unless eval { do { $module->inst_file } }
1136 0 0 unless eval 'require LWP::Simple; require URI; 1'
1142 0 0 if defined $content
1164 0 0 unless ($module)
1172 0 0 unless $module->userid
1190 0 0 unless $module->userid
1193 0 0 $module->description ? :
0 0 $module->uptodate ? :
1218 0 0 unless $module->inst_file
1219 0 0 if $module->uptodate
1220 0 0 $module->inst_version ? :
1239 0 0 unless exists $hash{lc $module->userid}
1266 0 0 unless defined $module_name
1281 0 0 if /\A\w+\.pm\z/
1294 0 0 unless open FILE, "<$file"
1301 0 0 /^=cut/ ? :
0 0 /^=(?!cut)/ ? :
1302 0 0 if $in_pod or /^\s*#/
1304 0 0 unless /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/
1312 0 0 unless defined $version
1344 0 0 if length $path < length $inc