Branch Coverage

blib/lib/CPAN/FirstTime.pm
Criterion Covered Total %
branch 0 396 0.0


line true false branch
835 0 0 $args{'args'} && @{$args{'args'};} ? :
836 0 0 if ($matcher =~ m[^/(.*)/$]) { }
0 0 elsif (0 == length $matcher) { }
840 0 0 if (@{$args{'args'};})
856 0 0 unless (exists $CPAN::HandleConfig::keys{$arg})
863 0 0 if $CPAN::DEBUG
865 0 0 unless ($CPAN::VERSION)
882 0 0 if ($args{'autoconfig'}) { }
0 0 elsif ($matcher) { }
888 0 0 $_conf && $_conf =~ /^y/i ? :
890 0 0 if $CPAN::DEBUG
891 0 0 if ($CPAN::FirstTime::auto_config)
904 0 0 unless ($matcher or _can_write_to_libdirs() or _using_installbase() or _using_sudo())
914 0 0 if (not $matcher or "\n build_dir\n build_dir_reuse\n cpan_home\n keep_source_where\n prefs_dir\n " =~ /$matcher/)
921 0 0 unless $CPAN::FirstTime::auto_config
981 0 0 if (not $matcher or "test_report" =~ /$matcher/)
983 0 0 if ($matcher and $CPAN::Config->{'test_report'} and $CPAN::META->has_inst("CPAN::Reporter") and "CPAN::Reporter"->can("configure"))
990 0 0 if ($_conf =~ /^y/i)
1003 0 0 if (not $matcher or "yaml_module" =~ /$matcher/)
1007 0 0 unless ($CPAN::FirstTime::auto_config or $CPAN::META->has_inst($CPAN::Config->{'yaml_module'}))
1025 0 0 unless $matcher or $CPAN::FirstTime::auto_config
1047 0 0 if ($path and "File::Spec"->file_name_is_absolute($path))
1048 0 0 unless -e $path
1053 0 0 if $^O eq "MSWin32"
1054 0 0 if $^O eq "os2"
1061 0 0 unless (defined $prefer_external_tar)
1062 0 0 if ($^O =~ /(MSWin32|solaris)/) { }
0 0 elsif ($tar) { }
1092 0 0 if (not $matcher or "makepl_arg make_arg" =~ /$matcher/)
1095 0 0 if ($CPAN::Config->{'makepl_arg'} =~ /LIBS=|INC=/)
1105 0 0 if (exists $CPAN::HandleConfig::keys{'make_install_make_command'})
1109 0 0 if ($default and $CPAN::Config->{'install_help'} eq "sudo")
1110 0 0 if (find_exe('sudo')) { }
1113 0 0 unless $CPAN::Config->{'make_install_make_command'} =~ /sudo/
1128 0 0 if (exists $CPAN::HandleConfig::keys{'mbuild_install_build_command'} and $^O ne "MSWin32")
1132 0 0 $^O eq 'VMS' ? :
1133 0 0 if ($CPAN::Config->{'install_help'} eq "sudo")
1134 0 0 if (find_exe('sudo')) { }
1137 0 0 unless $CPAN::Config->{'mbuild_install_build_command'} =~ /sudo/
1179 0 0 if (not $matcher or ("@proxy_vars @proxy_user_vars") =~ /$matcher/)
1180 0 0 unless $CPAN::FirstTime::auto_config
1187 0 0 if ($CPAN::Config->{'ftp_proxy'} or $CPAN::Config->{'http_proxy'})
1192 0 0 unless $CPAN::FirstTime::auto_config
1194 0 0 if ($CPAN::Config->{'proxy_user'} = &prompt("Your proxy user id?", $default))
1195 0 0 unless $CPAN::FirstTime::auto_config
1197 0 0 if ($CPAN::META->has_inst('Term::ReadKey')) { }
1200 0 0 unless $CPAN::FirstTime::auto_config
1203 0 0 if ($CPAN::META->has_inst("Term::ReadKey"))
1206 0 0 unless $CPAN::FirstTime::auto_config
1241 0 0 if ("colorize_output colorize_print colorize_warn colorize_debug" =~ /$matcher/)
1243 0 0 if ($CPAN::Config->{'colorize_output'})
1244 0 0 if ($CPAN::META->has_inst("Term::ANSIColor"))
1246 0 0 unless $CPAN::FirstTime::auto_config
1248 0 0 unless $CPAN::FirstTime::auto_config
1256 0 0 unless $CPAN::FirstTime::auto_config
1259 0 0 $FG || $BG ? :
0 0 unless $CPAN::FirstTime::auto_config
1262 0 0 unless $CPAN::FirstTime::auto_config
1264 0 0 unless $CPAN::FirstTime::auto_config
1272 0 0 if ($CPAN::META->has_inst("Term::ANSIColor"))
1274 0 0 if ($@)
1293 0 0 if (not $matcher or "histfile histsize" =~ /$matcher/)
1294 0 0 unless $CPAN::FirstTime::auto_config
1296 0 0 unless defined($default = $CPAN::Config->{'histfile'})
1299 0 0 if ($CPAN::Config->{'histfile'})
1300 0 0 unless defined($default = $CPAN::Config->{'histsize'})
1313 0 0 if (not $matcher or "show_unparsable_versions" =~ /$matcher/ or "show_zero_versions" =~ /$matcher/)
1331 0 0 if ($matcher)
1332 0 0 if ("urllist_ping_external" =~ /$matcher/)
1335 0 0 if ("urllist_ping_verbose" =~ /$matcher/)
1338 0 0 if ("randomize_urllist" =~ /$matcher/)
1341 0 0 if ("ftpstats_size" =~ /$matcher/)
1344 0 0 if ("ftpstats_period" =~ /$matcher/)
1351 0 0 if ($CPAN::FirstTime::auto_config) { }
0 0 elsif (not $matcher or 'urllist' =~ /$matcher/) { }
1352 0 0 if (@{$CPAN::Config->{'urllist'};}) { }
1369 0 0 if ($CPAN::FirstTime::auto_config)
1377 0 0 if ($CPAN::Config->{'install_help'} eq "local::lib")
1378 0 0 if (not @{$CPAN::Config->{'urllist'};}) { }
0 0 elsif (not $CPAN::Config->{'make'}) { }
1396 0 0 if ($locallib and $dist = $locallib->distribution)
1404 0 0 if (not $dist or my $err = $@) { }
1422 0 0 if ($matcher and not $CPAN::Config->{'auto_commit'}) { }
1429 0 0 if (not $matcher)
1455 0 0 if (my $rc = _find_shell_config())
1461 0 0 if ($_conf =~ /^y/i)
1470 0 0 if ($munged_rc) { }
1496 0 0 if (my $rc = $shell_rc_map{$shell})
1498 0 0 if -w $path
1518 0 0 if ($CPAN::META->has_usable('File::HomeDir') and 'File::HomeDir'->VERSION >= 0.65) { }
0 0 elsif (defined $ENV{'HOME'}) { }
1523 0 0 unless (getpwuid $<)[7]
1535 0 0 if ($CPAN::META->has_usable('Net::Ping') and 'CPAN::Version'->vgt('Net::Ping'->VERSION, '2.13')) { }
1541 0 0 if ($_conf =~ /^y/i) { }
1542 0 0 unless conf_sites("auto_pick", 1)
1545 0 0 if @old_list
1546 0 0 scalar @old_list ? :
1550 0 0 if ($_conf =~ /^y/i)
1565 0 0 if (not $matcher or join($", @external_progs) =~ /$matcher/)
1570 0 0 if $matcher and not $progname =~ /$matcher/
1573 0 0 unless ($matcher)
1576 0 0 if $progname eq "ncftp" and $CPAN::Config->{'ncftpget'} gt " "
1581 0 0 if ('File::Spec'->file_name_is_absolute($path)) { }
0 0 elsif ($path =~ /^\s+$/) { }
1592 0 0 unless ($path)
1594 0 0 if $Config::Config{$progname}
1598 0 0 unless ($path)
1600 0 0 unless $CPAN::FirstTime::auto_config
1601 0 0 if $progname eq "make"
1608 0 0 if ($progname eq 'make' and $disabling || !_check_found($path)) { }
0 0 elsif ($disabling) { }
0 0 elsif (_check_found($CPAN::Config->{$progname})) { }
1609 0 0 if ($disabling and $showed_make_warning) { }
1613 0 0 unless $showed_make_warning++
1623 0 0 if $shortcut and not $matcher
1636 0 0 if (not -f $prog) { }
0 0 elsif (not -x $prog) { }
1637 0 0 unless $CPAN::FirstTime::auto_config
1642 0 0 unless $CPAN::FirstTime::auto_config
1656 0 0 if ($^O eq "MSWin32")
1679 0 0 if (not $matcher or "cpan_home" =~ /$matcher/)
1682 0 0 if (-d $cpan_home) { }
1683 0 0 unless $CPAN::FirstTime::auto_config
1690 0 0 unless $CPAN::FirstTime::auto_config
1696 0 0 unless $CPAN::FirstTime::auto_config
1698 0 0 if ('File::Spec'->file_name_is_absolute($ans)) { }
1701 0 0 if ($dir =~ /^~/ and !$last_ans || $ans ne $last_ans)
1721 0 0 if ($@)
1726 0 0 if (-d $ans and -w _) { }
1731 0 0 if (++$loop > 5)
1744 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1745 0 0 if (my $intro = $CPAN::FirstTime::prompts{$item . '_intro'})
1751 0 0 $no_strip ? :
1761 0 0 unless defined($default = $CPAN::Config->{$item})
1763 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1764 0 0 if (my $intro = $CPAN::FirstTime::prompts{$item . '_intro'})
1768 0 0 $default ? :
1769 0 0 $ans =~ /^[y1]/i ? :
1780 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1782 0 0 if defined $intro
1808 0 0 if $args{'auto_pick'}
1815 0 0 if (-f $mby and -f $m and -M $m < -M $mby)
1817 0 0 unless File::Copy::copy($m, $mby)
1822 0 0 if ($mby and -f $mby and -s _ > 0) { }
1826 0 0 if ($args{'auto_pick'}) { }
1827 0 0 if ($very_old)
1829 0 0 unless eval { do { "CPAN::FTP"->localize($m, $mby, 3, 1) } }
1842 0 0 $very_old ? :
1843 0 0 if ($ans =~ /^n/i)
1847 0 0 unless eval { do { "CPAN::FTP"->localize($m, $mby, 3, 1) } }
1856 0 0 unless ($CPAN::Config->{'connect_to_internet_ok'})
1861 0 0 if ($ans =~ /^y/i)
1867 0 0 if ($CPAN::Config->{'connect_to_internet_ok'}) { }
1869 0 0 unless eval { do { "CPAN::FTP"->localize($m, $mby, 3, 1) } }
1885 0 0 if (-f $mby and -s _ > 0)
1887 0 0 $args{'auto_pick'} ? :
1901 0 0 if ($abs = "MM"->maybe_command($abs))
1909 0 0 if $CPAN::DEBUG
1920 0 0 if $limit > 15
1924 0 0 if $pos >= @$items
1935 0 0 if (0 == @nums) { }
0 0 elsif (grep((/\D/ || $_ < 1 || $_ > $i), @nums)) { }
1940 0 0 if (join($", @nums) =~ /\D/)
1945 0 0 if ($require_nonempty and not @nums)
1950 0 0 unless (@nums)
1963 0 0 unless $nums
1965 0 0 if ($n =~ /^(\d+)-(\d+)$/) { }
1984 0 0 $default ? :
1985 0 0 if $pos < @$items
1994 0 0 unless my $local = shift()
2006 0 0 if ($cnt++ > 60)
2009 0 0 $CPAN::Config->{'urllist_ping_external'} ? :
0 0 $CPAN::Config->{'urllist_ping_verbose'} ? :
2014 0 0 if $_ and ref $_
2018 0 0 if $callback_was_active
2024 0 0 unless my $local = shift()
2036 0 0 if (@previous_urls) { }
2054 0 0 if @cont > 1
2057 0 0 if (@previous_urls and @countries)
2062 0 0 if (@countries)
2071 0 0 if $country =~ /edit previous picks/
2075 0 0 if $m->ftp
2076 0 0 if $m->http
2079 0 0 if @countries > 1
2088 0 0 if (@previous_urls)
2111 0 0 unless (%seen)
2118 0 0 if ($ans) { }
2123 0 0 unless $ans =~ /:/
2124 0 0 if ($ans =~ m[^\w+:/.]) { }
2125 0 0 unless $seen{$ans}++
2139 0 0 if (++$eacnt >= 5)
2155 0 0 unless $CPAN::Config->{'urllist'}
2168 0 0 if $ENV{'PERL_MM_OPT'} and $ENV{'PERL_MM_OPT'} =~ /install_base/i
2169 0 0 if grep {($CPAN::Config->{$_} || '') =~ /install_base/i;} "makepl_arg", "make_install_arg", "mbuildpl_arg", "mbuild_install_arg"
2175 0 0 if grep {($CPAN::Config->{$_} || '') =~ /sudo/;} "make_install_make_command", "mbuild_install_build_command"
2186 0 0 unless (defined &CPAN::FirstTime::_real_prompt)
2192 0 0 unless $CPAN::FirstTime::auto_config
2199 0 0 unless (defined &CPAN::FirstTime::_real_prompt)