Branch Coverage

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


line true false branch
766 0 0 $args{'args'} && @{$args{'args'};} ? :
767 0 0 if ($matcher =~ m[^/(.*)/$]) { }
0 0 elsif (0 == length $matcher) { }
771 0 0 if (@{$args{'args'};})
787 0 0 unless (exists $CPAN::HandleConfig::keys{$arg})
794 0 0 if $CPAN::DEBUG
796 0 0 unless ($CPAN::VERSION)
813 0 0 if ($args{'autoconfig'}) { }
0 0 elsif ($matcher) { }
819 0 0 $_conf && $_conf =~ /^y/i ? :
821 0 0 if $CPAN::DEBUG
822 0 0 if ($CPAN::FirstTime::auto_config)
835 0 0 unless ($matcher or _can_write_to_libdirs() or _using_installbase() or _using_sudo())
845 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/)
852 0 0 unless $CPAN::FirstTime::auto_config
911 0 0 if (not $matcher or 'test_report' =~ /$matcher/)
913 0 0 if ($matcher and $CPAN::Config->{'test_report'} and $CPAN::META->has_inst('CPAN::Reporter') and 'CPAN::Reporter'->can('configure'))
920 0 0 if ($_conf =~ /^y/i)
933 0 0 if (not $matcher or 'yaml_module' =~ /$matcher/)
937 0 0 unless ($CPAN::FirstTime::auto_config or $CPAN::META->has_inst($CPAN::Config->{'yaml_module'}))
955 0 0 unless $matcher or $CPAN::FirstTime::auto_config
977 0 0 if ($path and 'File::Spec'->file_name_is_absolute($path))
978 0 0 unless -e $path
983 0 0 if $^O eq 'MSWin32'
984 0 0 if ($^O eq 'MacOS') { }
987 0 0 if $^O eq 'os2'
995 0 0 unless (defined $prefer_external_tar)
996 0 0 if ($^O =~ /(MSWin32|solaris)/) { }
0 0 elsif ($tar) { }
1026 0 0 if (not $matcher or 'makepl_arg make_arg' =~ /$matcher/)
1029 0 0 if ($CPAN::Config->{'makepl_arg'} =~ /LIBS=|INC=/)
1039 0 0 if (exists $CPAN::HandleConfig::keys{'make_install_make_command'})
1043 0 0 if ($default and $CPAN::Config->{'install_help'} eq 'sudo')
1044 0 0 if (find_exe('sudo')) { }
1047 0 0 unless $CPAN::Config->{'make_install_make_command'} =~ /sudo/
1062 0 0 if (exists $CPAN::HandleConfig::keys{'mbuild_install_build_command'} and $^O ne 'MSWin32')
1066 0 0 $^O eq 'VMS' ? :
1067 0 0 if ($CPAN::Config->{'install_help'} eq 'sudo')
1068 0 0 if (find_exe('sudo')) { }
1071 0 0 unless $CPAN::Config->{'mbuild_install_build_command'} =~ /sudo/
1105 0 0 if (not $matcher or "@proxy_vars @proxy_user_vars" =~ /$matcher/)
1106 0 0 unless $CPAN::FirstTime::auto_config
1113 0 0 if ($CPAN::Config->{'ftp_proxy'} or $CPAN::Config->{'http_proxy'})
1118 0 0 unless $CPAN::FirstTime::auto_config
1120 0 0 if ($CPAN::Config->{'proxy_user'} = &prompt('Your proxy user id?', $default))
1121 0 0 unless $CPAN::FirstTime::auto_config
1123 0 0 if ($CPAN::META->has_inst('Term::ReadKey')) { }
1126 0 0 unless $CPAN::FirstTime::auto_config
1129 0 0 if ($CPAN::META->has_inst('Term::ReadKey'))
1132 0 0 unless $CPAN::FirstTime::auto_config
1167 0 0 if ('colorize_output colorize_print colorize_warn colorize_debug' =~ /$matcher/)
1169 0 0 if ($CPAN::Config->{'colorize_output'})
1170 0 0 if ($CPAN::META->has_inst('Term::ANSIColor'))
1172 0 0 unless $CPAN::FirstTime::auto_config
1174 0 0 unless $CPAN::FirstTime::auto_config
1182 0 0 unless $CPAN::FirstTime::auto_config
1185 0 0 $FG || $BG ? :
0 0 unless $CPAN::FirstTime::auto_config
1188 0 0 unless $CPAN::FirstTime::auto_config
1190 0 0 unless $CPAN::FirstTime::auto_config
1198 0 0 if ($CPAN::META->has_inst('Term::ANSIColor'))
1200 0 0 if ($@)
1219 0 0 if (not $matcher or 'histfile histsize' =~ /$matcher/)
1220 0 0 unless $CPAN::FirstTime::auto_config
1222 0 0 unless defined($default = $CPAN::Config->{'histfile'})
1225 0 0 if ($CPAN::Config->{'histfile'})
1226 0 0 unless defined($default = $CPAN::Config->{'histsize'})
1239 0 0 if (not $matcher or 'show_unparsable_versions' =~ /$matcher/ or 'show_zero_versions' =~ /$matcher/)
1256 0 0 if ($matcher)
1257 0 0 if ('randomize_urllist' =~ /$matcher/)
1260 0 0 if ('ftpstats_size' =~ /$matcher/)
1263 0 0 if ('ftpstats_period' =~ /$matcher/)
1270 0 0 if ($CPAN::FirstTime::auto_config) { }
0 0 elsif (not $matcher or 'urllist' =~ /$matcher/) { }
1271 0 0 if (@{$CPAN::Config->{'urllist'};}) { }
1284 0 0 if ($CPAN::FirstTime::auto_config)
1292 0 0 if ($CPAN::Config->{'install_help'} eq 'local::lib')
1293 0 0 if (not @{$CPAN::Config->{'urllist'};}) { }
1304 0 0 if ($dist = 'CPAN::Shell'->expand('Module', 'local::lib')->distribution)
1312 0 0 if (not $dist or my $err = $@) { }
1330 0 0 if ($matcher and not $CPAN::Config->{'auto_commit'}) { }
1337 0 0 if (not $matcher)
1363 0 0 if (my $rc = _find_shell_config())
1369 0 0 if ($_conf =~ /^y/i)
1378 0 0 if ($munged_rc) { }
1404 0 0 if (my $rc = $shell_rc_map{$shell})
1406 0 0 if -w $path
1426 0 0 if ($CPAN::META->has_usable('File::HomeDir') and 'File::HomeDir'->VERSION >= 0.65) { }
0 0 elsif (defined $ENV{'HOME'}) { }
1431 0 0 unless (getpwuid $<)[7]
1443 0 0 if ($CPAN::META->has_usable('Net::Ping') and 'Net::Ping'->VERSION gt '2.13') { }
1449 0 0 if ($_conf =~ /^y/i) { }
1450 0 0 unless conf_sites('auto_pick', 1)
1453 0 0 if @old_list
1454 0 0 scalar @old_list ? :
1458 0 0 if ($_conf =~ /^y/i)
1473 0 0 if (not $matcher or join($", @external_progs) =~ /$matcher/)
1475 0 0 if $^O eq 'MacOS'
1479 0 0 if $matcher and not $progname =~ /$matcher/
1480 0 0 if ($^O eq 'MacOS')
1486 0 0 unless ($matcher)
1489 0 0 if $progname eq 'ncftp' and $CPAN::Config->{'ncftpget'} gt ' '
1494 0 0 if ('File::Spec'->file_name_is_absolute($path)) { }
0 0 elsif ($path =~ /^\s+$/) { }
1505 0 0 unless ($path)
1507 0 0 if $Config::Config{$progname}
1511 0 0 unless ($path)
1513 0 0 unless $CPAN::FirstTime::auto_config
1514 0 0 if $progname eq 'make'
1521 0 0 if ($progname eq 'make' and $disabling || !_check_found($path)) { }
0 0 elsif ($disabling) { }
0 0 elsif (_check_found($CPAN::Config->{$progname})) { }
1522 0 0 if ($disabling and $showed_make_warning) { }
1526 0 0 unless $showed_make_warning++
1536 0 0 if $shortcut and not $matcher
1549 0 0 if (not -f $prog) { }
0 0 elsif (not -x $prog) { }
1550 0 0 unless $CPAN::FirstTime::auto_config
1555 0 0 unless $CPAN::FirstTime::auto_config
1569 0 0 if ($^O eq 'MSWin32')
1587 0 0 if (not $matcher or 'cpan_home' =~ /$matcher/)
1590 0 0 if (-d $cpan_home) { }
1591 0 0 unless $CPAN::FirstTime::auto_config
1598 0 0 unless $CPAN::FirstTime::auto_config
1604 0 0 unless $CPAN::FirstTime::auto_config
1606 0 0 if ('File::Spec'->file_name_is_absolute($ans)) { }
1609 0 0 if ($dir =~ /^~/ and !$last_ans || $ans ne $last_ans)
1629 0 0 if ($@)
1634 0 0 if (-d $ans and -w _) { }
1639 0 0 if (++$loop > 5)
1652 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1653 0 0 if (my $intro = $CPAN::FirstTime::prompts{$item . '_intro'})
1659 0 0 $no_strip ? :
1669 0 0 unless defined($default = $CPAN::Config->{$item})
1672 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1673 0 0 if (my $intro = $CPAN::FirstTime::prompts{$item . '_intro'})
1677 0 0 $default ? :
1678 0 0 $ans =~ /^[y1]/i ? :
1689 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1716 0 0 if $args{'auto_pick'}
1723 0 0 if (-f $mby and -f $m and -M $m < -M $mby)
1725 0 0 unless File::Copy::copy($m, $mby)
1730 0 0 if ($mby and -f $mby and -s _ > 0) { }
1734 0 0 if ($args{'auto_pick'}) { }
1735 0 0 if ($very_old)
1737 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1750 0 0 $very_old ? :
1751 0 0 if ($ans =~ /^n/i)
1755 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1764 0 0 unless ($CPAN::Config->{'connect_to_internet_ok'})
1769 0 0 if ($ans =~ /^y/i)
1775 0 0 if ($CPAN::Config->{'connect_to_internet_ok'}) { }
1777 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1793 0 0 if (-f $mby and -s _ > 0)
1795 0 0 $args{'auto_pick'} ? :
1809 0 0 if ($abs = 'MM'->maybe_command($abs))
1817 0 0 if $CPAN::DEBUG
1828 0 0 if $limit > 15
1832 0 0 if $pos >= @$items
1843 0 0 if (0 == @nums) { }
0 0 elsif (grep((/\D/ || $_ < 1 || $_ > $i), @nums)) { }
1848 0 0 if (join($", @nums) =~ /\D/)
1853 0 0 if ($require_nonempty and not @nums)
1858 0 0 unless (@nums)
1871 0 0 unless $nums
1873 0 0 if ($n =~ /^(\d+)-(\d+)$/) { }
1892 0 0 $default ? :
1893 0 0 if $pos < @$items
1902 0 0 unless my $local = shift()
1912 0 0 if ($cnt++ > 60)
1924 0 0 unless my $local = shift()
1936 0 0 if (@previous_urls) { }
1954 0 0 if @cont > 1
1957 0 0 if (@previous_urls and @countries)
1962 0 0 if (@countries)
1971 0 0 if $country =~ /edit previous picks/
1975 0 0 if $m->ftp
1976 0 0 if $m->http
1979 0 0 if @countries > 1
1988 0 0 if (@previous_urls)
2011 0 0 unless (%seen)
2018 0 0 if ($ans) { }
2023 0 0 unless $ans =~ /:/
2024 0 0 if ($ans =~ m[^\w+:/.]) { }
2025 0 0 unless $seen{$ans}++
2039 0 0 if (++$eacnt >= 5)
2055 0 0 unless $CPAN::Config->{'urllist'}
2068 0 0 if $ENV{'PERL_MM_OPT'} and $ENV{'PERL_MM_OPT'} =~ /install_base/i
2069 0 0 if grep {($CPAN::Config->{$_} || '') =~ /install_base/i;} 'makepl_arg', 'make_install_arg', 'mbuildpl_arg', 'mbuild_install_arg'
2075 0 0 if grep {($CPAN::Config->{$_} || '') =~ /sudo/;} 'make_install_make_command', 'mbuild_install_build_command'
2086 0 0 unless (defined &CPAN::FirstTime::_real_prompt)
2092 0 0 unless $CPAN::FirstTime::auto_config
2099 0 0 unless (defined &CPAN::FirstTime::_real_prompt)