summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CPAN.pm21
-rw-r--r--lib/CPAN/FirstTime.pm7
2 files changed, 16 insertions, 12 deletions
diff --git a/lib/CPAN.pm b/lib/CPAN.pm
index ebc88ba3fa..059c4f569c 100644
--- a/lib/CPAN.pm
+++ b/lib/CPAN.pm
@@ -2634,26 +2634,27 @@ sub hosthard {
# success above. Likely a bogus URL
$self->debug("localizing funkyftpwise[$url]") if $CPAN::DEBUG;
- my($f,$funkyftp);
-
- # Try the most capable first (wget does HTTP, HTTPS and FTP) and
- # leave ncftp* for last as it only does FTP.
- for $f (qw(wget lynx ncftpget ncftp)) {
- next unless exists $CPAN::Config->{$f};
- $funkyftp = $CPAN::Config->{$f};
- next unless defined $funkyftp;
+
+ # Try the most capable first and leave ncftp* for last as it only
+ # does FTP.
+ for my $f (qw(curl wget lynx ncftpget ncftp)) {
+ my $funkyftp = $CPAN::Config->{$f};
+ next unless defined $funkyftp;
next if $funkyftp =~ /^\s*$/;
+
my($asl_ungz, $asl_gz);
($asl_ungz = $aslocal) =~ s/\.gz//;
$asl_gz = "$asl_ungz.gz";
+
my($src_switch) = "";
if ($f eq "lynx"){
$src_switch = " -source";
} elsif ($f eq "ncftp"){
$src_switch = " -c";
} elsif ($f eq "wget"){
- $src_switch = " -O -";
+ $src_switch = " -O -";
}
+
my($chdir) = "";
my($stdout_redir) = " > $asl_ungz";
if ($f eq "ncftpget"){
@@ -2729,7 +2730,7 @@ returned status $estatus (wstat $wstatus)$size
});
}
return if $CPAN::Signal;
- } # wget,lynx,ncftpget,ncftp
+ } # transfer programs
} # host
}
diff --git a/lib/CPAN/FirstTime.pm b/lib/CPAN/FirstTime.pm
index 5f9107faf1..35043d7b30 100644
--- a/lib/CPAN/FirstTime.pm
+++ b/lib/CPAN/FirstTime.pm
@@ -18,7 +18,7 @@ use File::Basename ();
use File::Path ();
use File::Spec;
use vars qw($VERSION);
-$VERSION = substr q$Revision: 1.60 $, 10;
+$VERSION = substr q$Revision: 1.60_01 $, 10;
=head1 NAME
@@ -289,7 +289,10 @@ by ENTER.
my(@path) = split /$Config{'path_sep'}/, $ENV{'PATH'};
local $^W = $old_warn;
my $progname;
- for $progname (qw/gzip tar unzip make lynx wget ncftpget ncftp ftp gpg/){
+ for $progname (qw/gzip tar unzip make
+ curl lynx wget ncftpget ncftp ftp
+ gpg/)
+ {
if ($^O eq 'MacOS') {
$CPAN::Config->{$progname} = 'not_here';
next;