New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add curl support to CPAN.pm #8013
Comments
From @schwernCreated by @schwernIt would be nice if CPAN.pm supported curl as a download method. The code for handling curl can be stolen from CPANPLUS. Perl Info
|
From @schwern
Well that was surprisingly easy. Patch attached. It makes curl the first choice since its the most capable of all the |
From @schwernCPAN_curl.patch--- lib/CPAN.pm 2005/07/15 08:58:37 1.1
+++ lib/CPAN.pm 2005/07/15 09:07:04
@@ -2634,26 +2634,27 @@
# 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 @@
});
}
return if $CPAN::Signal;
- } # wget,lynx,ncftpget,ncftp
+ } # transfer programs
} # host
}
--- lib/CPAN/FirstTime.pm 2005/07/15 09:04:12 1.1
+++ lib/CPAN/FirstTime.pm 2005/07/15 09:04:24
@@ -292,7 +292,10 @@
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;
|
@schwern - Status changed from 'new' to 'open' |
From @steve-m-hayMichael G Schwern via RT wrote:
Thanks. Applied as change 25155. Radan Computational Ltd. The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email. |
From @steve-m-hayNow fixed in bleadperl. |
@steve-m-hay - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#36514 (status was 'resolved')
Searchable as RT36514$
The text was updated successfully, but these errors were encountered: