Branch Coverage

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


line true false branch
774 0 0 $args{'args'} && @{$args{'args'};} ? :
775 0 0 if ($matcher =~ m[^/(.*)/$]) { }
0 0 elsif (0 == length $matcher) { }
779 0 0 if (@{$args{'args'};})
795 0 0 unless (exists $CPAN::HandleConfig::keys{$arg})
802 0 0 if $CPAN::DEBUG
804 0 0 unless ($CPAN::VERSION)
821 0 0 if ($args{'autoconfig'}) { }
0 0 elsif ($matcher) { }
827 0 0 $_conf && $_conf =~ /^y/i ? :
829 0 0 if $CPAN::DEBUG
830 0 0 if ($CPAN::FirstTime::auto_config)
843 0 0 unless ($matcher or _can_write_to_libdirs() or _using_installbase() or _using_sudo())
853 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/)
860 0 0 unless $CPAN::FirstTime::auto_config
920 0 0 if (not $matcher or 'test_report' =~ /$matcher/)
922 0 0 if ($matcher and $CPAN::Config->{'test_report'} and $CPAN::META->has_inst('CPAN::Reporter') and 'CPAN::Reporter'->can('configure'))
929 0 0 if ($_conf =~ /^y/i)
942 0 0 if (not $matcher or 'yaml_module' =~ /$matcher/)
946 0 0 unless ($CPAN::FirstTime::auto_config or $CPAN::META->has_inst($CPAN::Config->{'yaml_module'}))
964 0 0 unless $matcher or $CPAN::FirstTime::auto_config
986 0 0 if ($path and 'File::Spec'->file_name_is_absolute($path))
987 0 0 unless -e $path
992 0 0 if $^O eq 'MSWin32'
993 0 0 if ($^O eq 'MacOS') { }
996 0 0 if $^O eq 'os2'
1004 0 0 unless (defined $prefer_external_tar)
1005 0 0 if ($^O =~ /(MSWin32|solaris)/) { }
0 0 elsif ($tar) { }
1035 0 0 if (not $matcher or 'makepl_arg make_arg' =~ /$matcher/)
1038 0 0 if ($CPAN::Config->{'makepl_arg'} =~ /LIBS=|INC=/)
1048 0 0 if (exists $CPAN::HandleConfig::keys{'make_install_make_command'})
1052 0 0 if ($default and $CPAN::Config->{'install_help'} eq 'sudo')
1053 0 0 if (find_exe('sudo')) { }
1056 0 0 unless $CPAN::Config->{'make_install_make_command'} =~ /sudo/
1071 0 0 if (exists $CPAN::HandleConfig::keys{'mbuild_install_build_command'} and $^O ne 'MSWin32')
1075 0 0 $^O eq 'VMS' ? :
1076 0 0 if ($CPAN::Config->{'install_help'} eq 'sudo')
1077 0 0 if (find_exe('sudo')) { }
1080 0 0 unless $CPAN::Config->{'mbuild_install_build_command'} =~ /sudo/
1114 0 0 if (not $matcher or "@proxy_vars @proxy_user_vars" =~ /$matcher/)
1115 0 0 unless $CPAN::FirstTime::auto_config
1122 0 0 if ($CPAN::Config->{'ftp_proxy'} or $CPAN::Config->{'http_proxy'})
1127 0 0 unless $CPAN::FirstTime::auto_config
1129 0 0 if ($CPAN::Config->{'proxy_user'} = &prompt('Your proxy user id?', $default))
1130 0 0 unless $CPAN::FirstTime::auto_config
1132 0 0 if ($CPAN::META->has_inst('Term::ReadKey')) { }
1135 0 0 unless $CPAN::FirstTime::auto_config
1138 0 0 if ($CPAN::META->has_inst('Term::ReadKey'))
1141 0 0 unless $CPAN::FirstTime::auto_config
1176 0 0 if ('colorize_output colorize_print colorize_warn colorize_debug' =~ /$matcher/)
1178 0 0 if ($CPAN::Config->{'colorize_output'})
1179 0 0 if ($CPAN::META->has_inst('Term::ANSIColor'))
1181 0 0 unless $CPAN::FirstTime::auto_config
1183 0 0 unless $CPAN::FirstTime::auto_config
1191 0 0 unless $CPAN::FirstTime::auto_config
1194 0 0 $FG || $BG ? :
0 0 unless $CPAN::FirstTime::auto_config
1197 0 0 unless $CPAN::FirstTime::auto_config
1199 0 0 unless $CPAN::FirstTime::auto_config
1207 0 0 if ($CPAN::META->has_inst('Term::ANSIColor'))
1209 0 0 if ($@)
1228 0 0 if (not $matcher or 'histfile histsize' =~ /$matcher/)
1229 0 0 unless $CPAN::FirstTime::auto_config
1231 0 0 unless defined($default = $CPAN::Config->{'histfile'})
1234 0 0 if ($CPAN::Config->{'histfile'})
1235 0 0 unless defined($default = $CPAN::Config->{'histsize'})
1248 0 0 if (not $matcher or 'show_unparsable_versions' =~ /$matcher/ or 'show_zero_versions' =~ /$matcher/)
1265 0 0 if ($matcher)
1266 0 0 if ('randomize_urllist' =~ /$matcher/)
1269 0 0 if ('ftpstats_size' =~ /$matcher/)
1272 0 0 if ('ftpstats_period' =~ /$matcher/)
1279 0 0 if ($CPAN::FirstTime::auto_config) { }
0 0 elsif (not $matcher or 'urllist' =~ /$matcher/) { }
1280 0 0 if (@{$CPAN::Config->{'urllist'};}) { }
1293 0 0 if ($CPAN::FirstTime::auto_config)
1301 0 0 if ($CPAN::Config->{'install_help'} eq 'local::lib')
1302 0 0 if (not @{$CPAN::Config->{'urllist'};}) { }
1314 0 0 if ($locallib and $dist = $locallib->distribution)
1322 0 0 if (not $dist or my $err = $@) { }
1340 0 0 if ($matcher and not $CPAN::Config->{'auto_commit'}) { }
1347 0 0 if (not $matcher)
1373 0 0 if (my $rc = _find_shell_config())
1379 0 0 if ($_conf =~ /^y/i)
1388 0 0 if ($munged_rc) { }
1414 0 0 if (my $rc = $shell_rc_map{$shell})
1416 0 0 if -w $path
1436 0 0 if ($CPAN::META->has_usable('File::HomeDir') and 'File::HomeDir'->VERSION >= 0.65) { }
0 0 elsif (defined $ENV{'HOME'}) { }
1441 0 0 unless (getpwuid $<)[7]
1453 0 0 if ($CPAN::META->has_usable('Net::Ping') and 'Net::Ping'->VERSION gt '2.13') { }
1459 0 0 if ($_conf =~ /^y/i) { }
1460 0 0 unless conf_sites('auto_pick', 1)
1463 0 0 if @old_list
1464 0 0 scalar @old_list ? :
1468 0 0 if ($_conf =~ /^y/i)
1483 0 0 if (not $matcher or join($", @external_progs) =~ /$matcher/)
1485 0 0 if $^O eq 'MacOS'
1489 0 0 if $matcher and not $progname =~ /$matcher/
1490 0 0 if ($^O eq 'MacOS')
1496 0 0 unless ($matcher)
1499 0 0 if $progname eq 'ncftp' and $CPAN::Config->{'ncftpget'} gt ' '
1504 0 0 if ('File::Spec'->file_name_is_absolute($path)) { }
0 0 elsif ($path =~ /^\s+$/) { }
1515 0 0 unless ($path)
1517 0 0 if $Config::Config{$progname}
1521 0 0 unless ($path)
1523 0 0 unless $CPAN::FirstTime::auto_config
1524 0 0 if $progname eq 'make'
1531 0 0 if ($progname eq 'make' and $disabling || !_check_found($path)) { }
0 0 elsif ($disabling) { }
0 0 elsif (_check_found($CPAN::Config->{$progname})) { }
1532 0 0 if ($disabling and $showed_make_warning) { }
1536 0 0 unless $showed_make_warning++
1546 0 0 if $shortcut and not $matcher
1559 0 0 if (not -f $prog) { }
0 0 elsif (not -x $prog) { }
1560 0 0 unless $CPAN::FirstTime::auto_config
1565 0 0 unless $CPAN::FirstTime::auto_config
1579 0 0 if ($^O eq 'MSWin32')
1597 0 0 if (not $matcher or 'cpan_home' =~ /$matcher/)
1600 0 0 if (-d $cpan_home) { }
1601 0 0 unless $CPAN::FirstTime::auto_config
1608 0 0 unless $CPAN::FirstTime::auto_config
1614 0 0 unless $CPAN::FirstTime::auto_config
1616 0 0 if ('File::Spec'->file_name_is_absolute($ans)) { }
1619 0 0 if ($dir =~ /^~/ and !$last_ans || $ans ne $last_ans)
1639 0 0 if ($@)
1644 0 0 if (-d $ans and -w _) { }
1649 0 0 if (++$loop > 5)
1662 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1663 0 0 if (my $intro = $CPAN::FirstTime::prompts{$item . '_intro'})
1669 0 0 $no_strip ? :
1679 0 0 unless defined($default = $CPAN::Config->{$item})
1682 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1683 0 0 if (my $intro = $CPAN::FirstTime::prompts{$item . '_intro'})
1687 0 0 $default ? :
1688 0 0 $ans =~ /^[y1]/i ? :
1699 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1726 0 0 if $args{'auto_pick'}
1733 0 0 if (-f $mby and -f $m and -M $m < -M $mby)
1735 0 0 unless File::Copy::copy($m, $mby)
1740 0 0 if ($mby and -f $mby and -s _ > 0) { }
1744 0 0 if ($args{'auto_pick'}) { }
1745 0 0 if ($very_old)
1747 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1760 0 0 $very_old ? :
1761 0 0 if ($ans =~ /^n/i)
1765 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1774 0 0 unless ($CPAN::Config->{'connect_to_internet_ok'})
1779 0 0 if ($ans =~ /^y/i)
1785 0 0 if ($CPAN::Config->{'connect_to_internet_ok'}) { }
1787 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1803 0 0 if (-f $mby and -s _ > 0)
1805 0 0 $args{'auto_pick'} ? :
1819 0 0 if ($abs = 'MM'->maybe_command($abs))
1827 0 0 if $CPAN::DEBUG
1838 0 0 if $limit > 15
1842 0 0 if $pos >= @$items
1853 0 0 if (0 == @nums) { }
0 0 elsif (grep((/\D/ || $_ < 1 || $_ > $i), @nums)) { }
1858 0 0 if (join($", @nums) =~ /\D/)
1863 0 0 if ($require_nonempty and not @nums)
1868 0 0 unless (@nums)
1881 0 0 unless $nums
1883 0 0 if ($n =~ /^(\d+)-(\d+)$/) { }
1902 0 0 $default ? :
1903 0 0 if $pos < @$items
1912 0 0 unless my $local = shift()
1922 0 0 if ($cnt++ > 60)
1934 0 0 unless my $local = shift()
1946 0 0 if (@previous_urls) { }
1964 0 0 if @cont > 1
1967 0 0 if (@previous_urls and @countries)
1972 0 0 if (@countries)
1981 0 0 if $country =~ /edit previous picks/
1985 0 0 if $m->ftp
1986 0 0 if $m->http
1989 0 0 if @countries > 1
1998 0 0 if (@previous_urls)
2021 0 0 unless (%seen)
2028 0 0 if ($ans) { }
2033 0 0 unless $ans =~ /:/
2034 0 0 if ($ans =~ m[^\w+:/.]) { }
2035 0 0 unless $seen{$ans}++
2049 0 0 if (++$eacnt >= 5)
2065 0 0 unless $CPAN::Config->{'urllist'}
2078 0 0 if $ENV{'PERL_MM_OPT'} and $ENV{'PERL_MM_OPT'} =~ /install_base/i
2079 0 0 if grep {($CPAN::Config->{$_} || '') =~ /install_base/i;} 'makepl_arg', 'make_install_arg', 'mbuildpl_arg', 'mbuild_install_arg'
2085 0 0 if grep {($CPAN::Config->{$_} || '') =~ /sudo/;} 'make_install_make_command', 'mbuild_install_build_command'
2096 0 0 unless (defined &CPAN::FirstTime::_real_prompt)
2102 0 0 unless $CPAN::FirstTime::auto_config
2109 0 0 unless (defined &CPAN::FirstTime::_real_prompt)