Branch Coverage

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


line true false branch
821 0 0 $args{'args'} && @{$args{'args'};} ? :
822 0 0 if ($matcher =~ m[^/(.*)/$]) { }
0 0 elsif (0 == length $matcher) { }
826 0 0 if (@{$args{'args'};})
842 0 0 unless (exists $CPAN::HandleConfig::keys{$arg})
849 0 0 if $CPAN::DEBUG
851 0 0 unless ($CPAN::VERSION)
868 0 0 if ($args{'autoconfig'}) { }
0 0 elsif ($matcher) { }
874 0 0 $_conf && $_conf =~ /^y/i ? :
876 0 0 if $CPAN::DEBUG
877 0 0 if ($CPAN::FirstTime::auto_config)
890 0 0 unless ($matcher or _can_write_to_libdirs() or _using_installbase() or _using_sudo())
900 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/)
907 0 0 unless $CPAN::FirstTime::auto_config
967 0 0 if (not $matcher or 'test_report' =~ /$matcher/)
969 0 0 if ($matcher and $CPAN::Config->{'test_report'} and $CPAN::META->has_inst('CPAN::Reporter') and 'CPAN::Reporter'->can('configure'))
976 0 0 if ($_conf =~ /^y/i)
989 0 0 if (not $matcher or 'yaml_module' =~ /$matcher/)
993 0 0 unless ($CPAN::FirstTime::auto_config or $CPAN::META->has_inst($CPAN::Config->{'yaml_module'}))
1011 0 0 unless $matcher or $CPAN::FirstTime::auto_config
1033 0 0 if ($path and 'File::Spec'->file_name_is_absolute($path))
1034 0 0 unless -e $path
1039 0 0 if $^O eq 'MSWin32'
1040 0 0 if ($^O eq 'MacOS') { }
1043 0 0 if $^O eq 'os2'
1051 0 0 unless (defined $prefer_external_tar)
1052 0 0 if ($^O =~ /(MSWin32|solaris)/) { }
0 0 elsif ($tar) { }
1082 0 0 if (not $matcher or 'makepl_arg make_arg' =~ /$matcher/)
1085 0 0 if ($CPAN::Config->{'makepl_arg'} =~ /LIBS=|INC=/)
1095 0 0 if (exists $CPAN::HandleConfig::keys{'make_install_make_command'})
1099 0 0 if ($default and $CPAN::Config->{'install_help'} eq 'sudo')
1100 0 0 if (find_exe('sudo')) { }
1103 0 0 unless $CPAN::Config->{'make_install_make_command'} =~ /sudo/
1118 0 0 if (exists $CPAN::HandleConfig::keys{'mbuild_install_build_command'} and $^O ne 'MSWin32')
1122 0 0 $^O eq 'VMS' ? :
1123 0 0 if ($CPAN::Config->{'install_help'} eq 'sudo')
1124 0 0 if (find_exe('sudo')) { }
1127 0 0 unless $CPAN::Config->{'mbuild_install_build_command'} =~ /sudo/
1169 0 0 if (not $matcher or "@proxy_vars @proxy_user_vars" =~ /$matcher/)
1170 0 0 unless $CPAN::FirstTime::auto_config
1177 0 0 if ($CPAN::Config->{'ftp_proxy'} or $CPAN::Config->{'http_proxy'})
1182 0 0 unless $CPAN::FirstTime::auto_config
1184 0 0 if ($CPAN::Config->{'proxy_user'} = &prompt('Your proxy user id?', $default))
1185 0 0 unless $CPAN::FirstTime::auto_config
1187 0 0 if ($CPAN::META->has_inst('Term::ReadKey')) { }
1190 0 0 unless $CPAN::FirstTime::auto_config
1193 0 0 if ($CPAN::META->has_inst('Term::ReadKey'))
1196 0 0 unless $CPAN::FirstTime::auto_config
1231 0 0 if ('colorize_output colorize_print colorize_warn colorize_debug' =~ /$matcher/)
1233 0 0 if ($CPAN::Config->{'colorize_output'})
1234 0 0 if ($CPAN::META->has_inst('Term::ANSIColor'))
1236 0 0 unless $CPAN::FirstTime::auto_config
1238 0 0 unless $CPAN::FirstTime::auto_config
1246 0 0 unless $CPAN::FirstTime::auto_config
1249 0 0 $FG || $BG ? :
0 0 unless $CPAN::FirstTime::auto_config
1252 0 0 unless $CPAN::FirstTime::auto_config
1254 0 0 unless $CPAN::FirstTime::auto_config
1262 0 0 if ($CPAN::META->has_inst('Term::ANSIColor'))
1264 0 0 if ($@)
1283 0 0 if (not $matcher or 'histfile histsize' =~ /$matcher/)
1284 0 0 unless $CPAN::FirstTime::auto_config
1286 0 0 unless defined($default = $CPAN::Config->{'histfile'})
1289 0 0 if ($CPAN::Config->{'histfile'})
1290 0 0 unless defined($default = $CPAN::Config->{'histsize'})
1303 0 0 if (not $matcher or 'show_unparsable_versions' =~ /$matcher/ or 'show_zero_versions' =~ /$matcher/)
1320 0 0 if ($matcher)
1321 0 0 if ('urllist_ping_external' =~ /$matcher/)
1324 0 0 if ('urllist_ping_verbose' =~ /$matcher/)
1327 0 0 if ('randomize_urllist' =~ /$matcher/)
1330 0 0 if ('ftpstats_size' =~ /$matcher/)
1333 0 0 if ('ftpstats_period' =~ /$matcher/)
1340 0 0 if ($CPAN::FirstTime::auto_config) { }
0 0 elsif (not $matcher or 'urllist' =~ /$matcher/) { }
1341 0 0 if (@{$CPAN::Config->{'urllist'};}) { }
1354 0 0 if ($CPAN::FirstTime::auto_config)
1362 0 0 if ($CPAN::Config->{'install_help'} eq 'local::lib')
1363 0 0 if (not @{$CPAN::Config->{'urllist'};}) { }
1375 0 0 if ($locallib and $dist = $locallib->distribution)
1383 0 0 if (not $dist or my $err = $@) { }
1401 0 0 if ($matcher and not $CPAN::Config->{'auto_commit'}) { }
1408 0 0 if (not $matcher)
1434 0 0 if (my $rc = _find_shell_config())
1440 0 0 if ($_conf =~ /^y/i)
1449 0 0 if ($munged_rc) { }
1475 0 0 if (my $rc = $shell_rc_map{$shell})
1477 0 0 if -w $path
1497 0 0 if ($CPAN::META->has_usable('File::HomeDir') and 'File::HomeDir'->VERSION >= 0.65) { }
0 0 elsif (defined $ENV{'HOME'}) { }
1502 0 0 unless (getpwuid $<)[7]
1514 0 0 if ($CPAN::META->has_usable('Net::Ping') and 'CPAN::Version'->vgt('Net::Ping'->VERSION, '2.13')) { }
1520 0 0 if ($_conf =~ /^y/i) { }
1521 0 0 unless conf_sites('auto_pick', 1)
1524 0 0 if @old_list
1525 0 0 scalar @old_list ? :
1529 0 0 if ($_conf =~ /^y/i)
1544 0 0 if (not $matcher or join($", @external_progs) =~ /$matcher/)
1546 0 0 if $^O eq 'MacOS'
1550 0 0 if $matcher and not $progname =~ /$matcher/
1551 0 0 if ($^O eq 'MacOS')
1557 0 0 unless ($matcher)
1560 0 0 if $progname eq 'ncftp' and $CPAN::Config->{'ncftpget'} gt ' '
1565 0 0 if ('File::Spec'->file_name_is_absolute($path)) { }
0 0 elsif ($path =~ /^\s+$/) { }
1576 0 0 unless ($path)
1578 0 0 if $Config::Config{$progname}
1582 0 0 unless ($path)
1584 0 0 unless $CPAN::FirstTime::auto_config
1585 0 0 if $progname eq 'make'
1592 0 0 if ($progname eq 'make' and $disabling || !_check_found($path)) { }
0 0 elsif ($disabling) { }
0 0 elsif (_check_found($CPAN::Config->{$progname})) { }
1593 0 0 if ($disabling and $showed_make_warning) { }
1597 0 0 unless $showed_make_warning++
1607 0 0 if $shortcut and not $matcher
1620 0 0 if (not -f $prog) { }
0 0 elsif (not -x $prog) { }
1621 0 0 unless $CPAN::FirstTime::auto_config
1626 0 0 unless $CPAN::FirstTime::auto_config
1640 0 0 if ($^O eq 'MSWin32')
1658 0 0 if (not $matcher or 'cpan_home' =~ /$matcher/)
1661 0 0 if (-d $cpan_home) { }
1662 0 0 unless $CPAN::FirstTime::auto_config
1669 0 0 unless $CPAN::FirstTime::auto_config
1675 0 0 unless $CPAN::FirstTime::auto_config
1677 0 0 if ('File::Spec'->file_name_is_absolute($ans)) { }
1680 0 0 if ($dir =~ /^~/ and !$last_ans || $ans ne $last_ans)
1700 0 0 if ($@)
1705 0 0 if (-d $ans and -w _) { }
1710 0 0 if (++$loop > 5)
1723 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1724 0 0 if (my $intro = $CPAN::FirstTime::prompts{$item . '_intro'})
1730 0 0 $no_strip ? :
1740 0 0 unless defined($default = $CPAN::Config->{$item})
1742 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1743 0 0 if (my $intro = $CPAN::FirstTime::prompts{$item . '_intro'})
1747 0 0 $default ? :
1748 0 0 $ans =~ /^[y1]/i ? :
1759 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1761 0 0 if defined $intro
1787 0 0 if $args{'auto_pick'}
1794 0 0 if (-f $mby and -f $m and -M $m < -M $mby)
1796 0 0 unless File::Copy::copy($m, $mby)
1801 0 0 if ($mby and -f $mby and -s _ > 0) { }
1805 0 0 if ($args{'auto_pick'}) { }
1806 0 0 if ($very_old)
1808 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1821 0 0 $very_old ? :
1822 0 0 if ($ans =~ /^n/i)
1826 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1835 0 0 unless ($CPAN::Config->{'connect_to_internet_ok'})
1840 0 0 if ($ans =~ /^y/i)
1846 0 0 if ($CPAN::Config->{'connect_to_internet_ok'}) { }
1848 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1864 0 0 if (-f $mby and -s _ > 0)
1866 0 0 $args{'auto_pick'} ? :
1880 0 0 if ($abs = 'MM'->maybe_command($abs))
1888 0 0 if $CPAN::DEBUG
1899 0 0 if $limit > 15
1903 0 0 if $pos >= @$items
1914 0 0 if (0 == @nums) { }
0 0 elsif (grep((/\D/ || $_ < 1 || $_ > $i), @nums)) { }
1919 0 0 if (join($", @nums) =~ /\D/)
1924 0 0 if ($require_nonempty and not @nums)
1929 0 0 unless (@nums)
1942 0 0 unless $nums
1944 0 0 if ($n =~ /^(\d+)-(\d+)$/) { }
1963 0 0 $default ? :
1964 0 0 if $pos < @$items
1973 0 0 unless my $local = shift()
1985 0 0 if ($cnt++ > 60)
1988 0 0 $CPAN::Config->{'urllist_ping_external'} ? :
0 0 $CPAN::Config->{'urllist_ping_verbose'} ? :
1993 0 0 if $_ and ref $_
1997 0 0 if $callback_was_active
2003 0 0 unless my $local = shift()
2015 0 0 if (@previous_urls) { }
2033 0 0 if @cont > 1
2036 0 0 if (@previous_urls and @countries)
2041 0 0 if (@countries)
2050 0 0 if $country =~ /edit previous picks/
2054 0 0 if $m->ftp
2055 0 0 if $m->http
2058 0 0 if @countries > 1
2067 0 0 if (@previous_urls)
2090 0 0 unless (%seen)
2097 0 0 if ($ans) { }
2102 0 0 unless $ans =~ /:/
2103 0 0 if ($ans =~ m[^\w+:/.]) { }
2104 0 0 unless $seen{$ans}++
2118 0 0 if (++$eacnt >= 5)
2134 0 0 unless $CPAN::Config->{'urllist'}
2147 0 0 if $ENV{'PERL_MM_OPT'} and $ENV{'PERL_MM_OPT'} =~ /install_base/i
2148 0 0 if grep {($CPAN::Config->{$_} || '') =~ /install_base/i;} 'makepl_arg', 'make_install_arg', 'mbuildpl_arg', 'mbuild_install_arg'
2154 0 0 if grep {($CPAN::Config->{$_} || '') =~ /sudo/;} 'make_install_make_command', 'mbuild_install_build_command'
2165 0 0 unless (defined &CPAN::FirstTime::_real_prompt)
2171 0 0 unless $CPAN::FirstTime::auto_config
2178 0 0 unless (defined &CPAN::FirstTime::_real_prompt)