package CPAN::LWP::UserAgent;
use vars qw(@ISA $USER $PASSWD $SETUPDONE);
-# we delay requiring LWP::UserAgent and setting up inheritence until we need it
+# we delay requiring LWP::UserAgent and setting up inheritance until we need it
package CPAN::Complete;
@CPAN::Complete::ISA = qw(CPAN::Debug);
# 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 -";
+ } elsif ($f eq "wget"){
+ $src_switch = " -O -";
+ } elsif ($f eq 'curl'){
+ $src_switch = ' -L';
}
+
my($chdir) = "";
my($stdout_redir) = " > $asl_ungz";
if ($f eq "ncftpget"){
});
}
return if $CPAN::Signal;
- } # wget,lynx,ncftpget,ncftp
+ } # transfer programs
} # host
}
require() statements.
The configuration dialog can be started any time later again by
-issueing the command C< o conf init > in the CPAN shell.
+issuing the command C< o conf init > in the CPAN shell.
Currently the following keys in the hash reference $CPAN::Config are
defined:
Thanks to Graham Barr for contributing the following paragraphs about
the interaction between perl, and various firewall configurations. For
-further informations on firewalls, it is recommended to consult the
+further information on firewalls, it is recommended to consult the
documentation that comes with the ncftp program. If you are unable to
go through the firewall with a simple Perl setup, it is very likely
that you can configure ncftp so that it works for your firewall.