summaryrefslogtreecommitdiff
path: root/cpan/CPAN/lib/CPAN/FirstTime.pm
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/CPAN/lib/CPAN/FirstTime.pm')
-rw-r--r--cpan/CPAN/lib/CPAN/FirstTime.pm48
1 files changed, 26 insertions, 22 deletions
diff --git a/cpan/CPAN/lib/CPAN/FirstTime.pm b/cpan/CPAN/lib/CPAN/FirstTime.pm
index 667bdca2f9..5030ef9b83 100644
--- a/cpan/CPAN/lib/CPAN/FirstTime.pm
+++ b/cpan/CPAN/lib/CPAN/FirstTime.pm
@@ -202,8 +202,8 @@ Preferred method for determining the current working directory?
=item halt_on_failure
Normally, CPAN.pm continues processing the full list of targets and
-dependencies, even if one of them fails. However, you can specify
-that CPAN should halt after the first failure.
+dependencies, even if one of them fails. However, you can specify
+that CPAN should halt after the first failure.
Do you want to halt on failure (yes/no)?
@@ -339,7 +339,7 @@ Your choice:
Parameters for the './Build install' command? Typical frequently used
setting:
- --uninst 1 # uninstall conflicting files
+ --uninst 1 # uninstall conflicting files
# (but do NOT use with local::lib or INSTALL_BASE)
Your choice:
@@ -781,8 +781,8 @@ sub init {
if ( $args{autoconfig} ) {
$auto_config = 1;
} elsif ($matcher) {
- $auto_config = 0;
- } else {
+ $auto_config = 0;
+ } else {
my $_conf = prompt($prompts{auto_config}, "yes");
$auto_config = ($_conf and $_conf =~ /^y/i) ? 1 : 0;
}
@@ -795,7 +795,7 @@ sub init {
my $i_am_mad = 0;
# silent prompting -- just quietly use default
*_real_prompt = sub { return $_[1] };
- }
+ }
#
# bootstrap local::lib or sudo
@@ -993,8 +993,8 @@ sub init {
my_dflt_prompt(makepl_arg => "", $matcher);
my_dflt_prompt(make_arg => "", $matcher);
if ( $CPAN::Config->{makepl_arg} =~ /LIBS=|INC=/ ) {
- $CPAN::Frontend->mywarn(
- "Warning: Using LIBS or INC in makepl_arg will likely break distributions\n" .
+ $CPAN::Frontend->mywarn(
+ "Warning: Using LIBS or INC in makepl_arg will likely break distributions\n" .
"that specify their own LIBS or INC options in Makefile.PL.\n"
);
}
@@ -1224,9 +1224,9 @@ sub init {
);
}
else {
- $CPAN::Frontend->myprint(
- "Autoconfigured everything but 'urllist'.\n"
- );
+ $CPAN::Frontend->myprint(
+ "Autoconfigured everything but 'urllist'.\n"
+ );
_do_pick_mirrors();
}
}
@@ -1247,8 +1247,8 @@ sub init {
$CPAN::Frontend->myprint(
"Skipping local::lib bootstrap because 'urllist' is not configured.\n"
);
- }
- else {
+ }
+ else {
$CPAN::Frontend->myprint("\nAttempting to bootstrap local::lib...\n");
$CPAN::Frontend->myprint("\nWriting $configpm for bootstrap...\n");
delete $CPAN::Config->{install_help}; # temporary only
@@ -1268,11 +1268,11 @@ sub init {
$CPAN::Frontend->myprint("From the CPAN Shell, you might try 'look local::lib' and \n"
. "run 'perl Makefile --bootstrap' and see if that is successful. Then\n"
. "restart your CPAN client\n"
- );
+ );
}
else {
_local_lib_config();
- }
+ }
}
}
@@ -1515,7 +1515,7 @@ ALERT: 'make' is an essential tool for building perl Modules.
Please make sure you have 'make' (or some equivalent) working.
HERE
- if ($^O eq "MSWin32") {
+ if ($^O eq "MSWin32") {
$CPAN::Frontend->mywarn(<<"HERE");
Windows users may want to follow this procedure when back in the CPAN shell:
@@ -1528,7 +1528,7 @@ substitute. You can then revisit this dialog with
o conf init make
HERE
- }
+ }
}
sub init_cpan_home {
@@ -1657,7 +1657,7 @@ sub my_prompt_loop {
# (2) We don't have a copy at all
# (2a) If we are allowed to connect, we try to get a new copy. If it succeeds,
# we use it, otherwise, we warn about failure
-# (2b) If we aren't allowed to connect,
+# (2b) If we aren't allowed to connect,
sub conf_sites {
my %args = @_;
@@ -1732,7 +1732,7 @@ HERE
}
else {
$CPAN::Frontend->mywarn(<<'HERE');
-You will need to provide CPAN mirror URLs yourself or set
+You will need to provide CPAN mirror URLs yourself or set
'o conf connect_to_internet_ok 1' and try again.
HERE
}
@@ -1851,7 +1851,9 @@ sub auto_mirrored_by {
my $local = shift or return;
local $|=1;
$CPAN::Frontend->myprint("Looking for CPAN mirrors near you (please be patient)\n");
- my $mirrors = CPAN::Mirrors->new($local);
+ my $mirrors = CPAN::Mirrors->new;
+ $mirrors->parse_mirrored_by($local);
+
my $cnt = 0;
my @best = $mirrors->best_mirrors(
how_many => 3,
@@ -1860,9 +1862,11 @@ sub auto_mirrored_by {
if ($cnt++>60) { $cnt=0; $CPAN::Frontend->myprint("\n"); }
},
);
+
my $urllist = [ map { $_->http } @best ];
push @$urllist, grep { /^file:/ } @{$CPAN::Config->{urllist}};
$CPAN::Frontend->myprint(" done!\n\n");
+
return $urllist
}
@@ -1998,8 +2002,8 @@ later if you\'re sure it\'s right.\n},
sub _print_urllist {
my ($which) = @_;
$CPAN::Frontend->myprint("$which urllist\n");
- for ( @{$CPAN::Config->{urllist} || []} ) {
- $CPAN::Frontend->myprint(" $_\n")
+ for ( @{$CPAN::Config->{urllist} || []} ) {
+ $CPAN::Frontend->myprint(" $_\n")
};
}