Branch Coverage

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


line true false branch
765 0 0 $args{'args'} && @{$args{'args'};} ? :
766 0 0 if ($matcher =~ m[^/(.*)/$]) { }
0 0 elsif (0 == length $matcher) { }
770 0 0 if (@{$args{'args'};})
786 0 0 unless (exists $CPAN::HandleConfig::keys{$arg})
793 0 0 if $CPAN::DEBUG
795 0 0 unless ($CPAN::VERSION)
812 0 0 if ($args{'autoconfig'}) { }
0 0 elsif ($matcher) { }
818 0 0 $_conf && $_conf =~ /^y/i ? :
820 0 0 if $CPAN::DEBUG
821 0 0 if ($CPAN::FirstTime::auto_config)
834 0 0 unless ($matcher or _can_write_to_libdirs() or _using_installbase() or _using_sudo())
844 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/)
851 0 0 unless $CPAN::FirstTime::auto_config
910 0 0 if (not $matcher or 'test_report' =~ /$matcher/)
912 0 0 if ($matcher and $$CPAN::Config{'test_report'} and $CPAN::META->has_inst('CPAN::Reporter') and 'CPAN::Reporter'->can('configure'))
919 0 0 if ($_conf =~ /^y/i)
932 0 0 if (not $matcher or 'yaml_module' =~ /$matcher/)
936 0 0 unless ($CPAN::FirstTime::auto_config or $CPAN::META->has_inst($$CPAN::Config{'yaml_module'}))
953 0 0 unless $matcher or $CPAN::FirstTime::auto_config
976 0 0 if ($path and 'File::Spec'->file_name_is_absolute($path))
977 0 0 unless -e $path
982 0 0 if $^O eq 'MSWin32'
983 0 0 if ($^O eq 'MacOS') { }
986 0 0 if $^O eq 'os2'
994 0 0 unless (defined $prefer_external_tar)
995 0 0 if ($^O =~ /(MSWin32|solaris)/) { }
0 0 elsif ($tar) { }
1025 0 0 if (not $matcher or 'makepl_arg make_arg' =~ /$matcher/)
1028 0 0 if ($$CPAN::Config{'makepl_arg'} =~ /LIBS=|INC=/)
1038 0 0 if (exists $CPAN::HandleConfig::keys{'make_install_make_command'})
1042 0 0 if ($default and $$CPAN::Config{'install_help'} eq 'sudo')
1043 0 0 if (find_exe('sudo')) { }
1045 0 0 unless $$CPAN::Config{'make_install_make_command'} =~ /sudo/
1061 0 0 if (exists $CPAN::HandleConfig::keys{'mbuild_install_build_command'} and $^O ne 'MSWin32')
1065 0 0 $^O eq 'VMS' ? :
1066 0 0 if ($$CPAN::Config{'install_help'} eq 'sudo')
1067 0 0 if (find_exe('sudo')) { }
1069 0 0 unless $$CPAN::Config{'mbuild_install_build_command'} =~ /sudo/
1104 0 0 if (not $matcher or "@proxy_vars @proxy_user_vars" =~ /$matcher/)
1105 0 0 unless $CPAN::FirstTime::auto_config
1112 0 0 if ($$CPAN::Config{'ftp_proxy'} or $$CPAN::Config{'http_proxy'})
1117 0 0 unless $CPAN::FirstTime::auto_config
1119 0 0 if ($$CPAN::Config{'proxy_user'} = &prompt(, $default))
1120 0 0 unless $CPAN::FirstTime::auto_config
1122 0 0 if ($CPAN::META->has_inst('Term::ReadKey')) { }
1125 0 0 unless $CPAN::FirstTime::auto_config
1128 0 0 if ($CPAN::META->has_inst('Term::ReadKey'))
1131 0 0 unless $CPAN::FirstTime::auto_config
1155 0 0 if ('colorize_output colorize_print colorize_warn colorize_debug' =~ /$matcher/)
1157 0 0 if ($$CPAN::Config{'colorize_output'})
1158 0 0 if ($CPAN::META->has_inst('Term::ANSIColor'))
1160 0 0 unless $CPAN::FirstTime::auto_config
1162 0 0 unless $CPAN::FirstTime::auto_config
1170 0 0 unless $CPAN::FirstTime::auto_config
1173 0 0 $FG || $BG ? :
0 0 unless $CPAN::FirstTime::auto_config
1176 0 0 unless $CPAN::FirstTime::auto_config
1178 0 0 unless $CPAN::FirstTime::auto_config
1186 0 0 if ($CPAN::META->has_inst('Term::ANSIColor'))
1188 0 0 if ($@)
1207 0 0 if (not $matcher or 'histfile histsize' =~ /$matcher/)
1208 0 0 unless $CPAN::FirstTime::auto_config
1209 0 0 unless defined($default = $$CPAN::Config{'histfile'})
1213 0 0 if ($$CPAN::Config{'histfile'})
1214 0 0 unless defined($default = $$CPAN::Config{'histsize'})
1227 0 0 if (not $matcher or 'show_unparsable_versions' =~ /$matcher/ or 'show_zero_versions' =~ /$matcher/)
1244 0 0 if ($matcher)
1245 0 0 if ('randomize_urllist' =~ /$matcher/)
1248 0 0 if ('ftpstats_size' =~ /$matcher/)
1251 0 0 if ('ftpstats_period' =~ /$matcher/)
1258 0 0 if ($CPAN::FirstTime::auto_config) { }
0 0 elsif (not $matcher or 'urllist' =~ /$matcher/) { }
1259 0 0 if (@{$$CPAN::Config{'urllist'};}) { }
1272 0 0 if ($CPAN::FirstTime::auto_config)
1280 0 0 if ($$CPAN::Config{'install_help'} eq 'local::lib')
1281 0 0 if (not @{$$CPAN::Config{'urllist'};}) { }
1292 0 0 if ($dist = 'CPAN::Shell'->expand('Module', 'local::lib')->distribution)
1300 0 0 if (not $dist or my $err = $@) { }
1318 0 0 if ($matcher and not $$CPAN::Config{'auto_commit'}) { }
1325 0 0 if (not $matcher)
1351 0 0 if (my $rc = _find_shell_config())
1357 0 0 if ($_conf =~ /^y/i)
1366 0 0 if ($munged_rc) { }
1392 0 0 if (my $rc = $shell_rc_map{$shell})
1394 0 0 if -w $path
1414 0 0 if ($CPAN::META->has_usable('File::HomeDir') and 'File::HomeDir'->VERSION >= 0.65) { }
0 0 elsif (defined $ENV{'HOME'}) { }
1419 0 0 unless (getpwuid $<)[7]
1431 0 0 if ($CPAN::META->has_usable('Net::Ping') and 'Net::Ping'->VERSION gt '2.13') { }
1437 0 0 if ($_conf =~ /^y/i) { }
1438 0 0 unless conf_sites('auto_pick', 1)
1441 0 0 if @old_list
1442 0 0 scalar @old_list ? :
1446 0 0 if ($_conf =~ /^y/i)
1461 0 0 if (not $matcher or "@external_progs" =~ /$matcher/)
1463 0 0 if $^O eq 'MacOS'
1467 0 0 if $matcher and not $progname =~ /$matcher/
1468 0 0 if ($^O eq 'MacOS')
1474 0 0 unless ($matcher)
1477 0 0 if $progname eq 'ncftp' and $$CPAN::Config{'ncftpget'} gt ' '
1482 0 0 if ('File::Spec'->file_name_is_absolute($path)) { }
0 0 elsif ($path =~ /^\s+$/) { }
1493 0 0 unless ($path)
1495 0 0 if $Config::Config{$progname}
1499 0 0 unless ($path)
1501 0 0 unless $CPAN::FirstTime::auto_config
1502 0 0 if $progname eq 'make'
1509 0 0 if ($progname eq 'make' and $disabling || !_check_found($path)) { }
0 0 elsif ($disabling) { }
0 0 elsif (_check_found($$CPAN::Config{$progname})) { }
1510 0 0 if ($disabling and $showed_make_warning) { }
1514 0 0 unless $showed_make_warning++
1524 0 0 if $shortcut and not $matcher
1537 0 0 if (not -f $prog) { }
0 0 elsif (not -x $prog) { }
1538 0 0 unless $CPAN::FirstTime::auto_config
1543 0 0 unless $CPAN::FirstTime::auto_config
1557 0 0 if ($^O eq 'MSWin32')
1575 0 0 if (not $matcher or 'cpan_home' =~ /$matcher/)
1578 0 0 if (-d $cpan_home) { }
1579 0 0 unless $CPAN::FirstTime::auto_config
1586 0 0 unless $CPAN::FirstTime::auto_config
1592 0 0 unless $CPAN::FirstTime::auto_config
1594 0 0 if ('File::Spec'->file_name_is_absolute($ans)) { }
1597 0 0 if ($dir =~ /^~/ and !$last_ans || $ans ne $last_ans)
1617 0 0 if ($@)
1622 0 0 if (-d $ans and -w _) { }
1627 0 0 if (++$loop > 5)
1640 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1641 0 0 if (my $intro = $CPAN::FirstTime::prompts{$item . '_intro'})
1645 0 0 $no_strip ? :
1657 0 0 unless defined($default = $$CPAN::Config{$item})
1660 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1661 0 0 if (my $intro = $CPAN::FirstTime::prompts{$item . '_intro'})
1665 0 0 $default ? :
1666 0 0 $ans =~ /^[y1]/i ? :
1677 0 0 if (not $CPAN::FirstTime::auto_config and !$m || $item =~ /$m/) { }
1704 0 0 if $args{'auto_pick'}
1711 0 0 if (-f $mby and -f $m and -M $m < -M $mby)
1713 0 0 unless File::Copy::copy($m, $mby)
1718 0 0 if ($mby and -f $mby and -s _ > 0) { }
1722 0 0 if ($args{'auto_pick'}) { }
1723 0 0 if ($very_old)
1725 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1738 0 0 $very_old ? :
1739 0 0 if ($ans =~ /^n/i)
1743 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1752 0 0 unless ($$CPAN::Config{'connect_to_internet_ok'})
1757 0 0 if ($ans =~ /^y/i)
1763 0 0 if ($$CPAN::Config{'connect_to_internet_ok'}) { }
1765 0 0 unless eval { do { 'CPAN::FTP'->localize($m, $mby, 3, 1) } }
1781 0 0 if (-f $mby and -s _ > 0)
1782 0 0 $args{'auto_pick'} ? :
1797 0 0 if ($abs = 'MM'->maybe_command($abs))
1805 0 0 if $CPAN::DEBUG
1816 0 0 if $limit > 15
1820 0 0 if $pos >= @$items
1831 0 0 if (0 == @nums) { }
0 0 elsif (grep((/\D/ || $_ < 1 || $_ > $i), @nums)) { }
1836 0 0 if ("@nums" =~ /\D/)
1841 0 0 if ($require_nonempty and not @nums)
1846 0 0 unless (@nums)
1859 0 0 unless $nums
1861 0 0 if ($n =~ /^(\d+)-(\d+)$/) { }
1880 0 0 $default ? :
1881 0 0 if $pos < @$items
1890 0 0 unless my $local = shift()
1900 0 0 if ($cnt++ > 60)
1912 0 0 unless my $local = shift()
1924 0 0 if (@previous_urls) { }
1942 0 0 if @cont > 1
1945 0 0 if (@previous_urls and @countries)
1950 0 0 if (@countries)
1959 0 0 if $country =~ /edit previous picks/
1963 0 0 if $m->ftp
1964 0 0 if $m->http
1967 0 0 if @countries > 1
1976 0 0 if (@previous_urls)
1999 0 0 unless (%seen)
2006 0 0 if ($ans) { }
2011 0 0 unless $ans =~ /:/
2012 0 0 if ($ans =~ m[^\w+:/.]) { }
2013 0 0 unless $seen{$ans}++
2027 0 0 if (++$eacnt >= 5)
2043 0 0 unless $$CPAN::Config{'urllist'}
2056 0 0 if $ENV{'PERL_MM_OPT'} and $ENV{'PERL_MM_OPT'} =~ /install_base/i
2057 0 0 if grep {($$CPAN::Config{$_} || '') =~ /install_base/i;} 'makepl_arg', 'make_install_arg', 'mbuildpl_arg', 'mbuild_install_arg'
2063 0 0 if grep {($$CPAN::Config{$_} || '') =~ /sudo/;} 'make_install_make_command', 'mbuild_install_build_command'
2074 0 0 unless (defined &_real_prompt)
2080 0 0 unless $CPAN::FirstTime::auto_config
2087 0 0 unless (defined &_real_prompt)