summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Brocard <acme@astray.com>2011-07-18 12:13:20 +0100
committerLeon Brocard <acme@astray.com>2011-07-18 12:13:20 +0100
commit9168ed13c3995a6f331c932c952ea164026411f0 (patch)
tree23cdb1618cae1446a87e3e7197ef196acdecbb19
parentb87bfaf33d1f55cd756031fd4f3a9ecf4419f7ea (diff)
downloadperl-9168ed13c3995a6f331c932c952ea164026411f0.tar.gz
Make Porting/corelist.pl fetch gzipped 02packages.details.txt from CPAN
-rwxr-xr-xPorting/corelist.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/Porting/corelist.pl b/Porting/corelist.pl
index f524d3eb03..ead044b6a2 100755
--- a/Porting/corelist.pl
+++ b/Porting/corelist.pl
@@ -19,6 +19,7 @@ use File::Spec;
use Parse::CPAN::Meta;
use IPC::Cmd 'can_run';
use HTTP::Tiny;
+use IO::Uncompress::Gunzip;
my $corelist_file = 'dist/Module-CoreList/lib/Module/CoreList.pm';
@@ -55,10 +56,12 @@ if ($cpan) {
open $fh, '-|', "$zcat $modlistfile.gz";
} else {
warn "About to fetch 02packages from ftp.funet.fi. This may take a few minutes\n";
- $content = fetch_url('http://ftp.funet.fi/pub/CPAN/modules/02packages.details.txt');
- unless ($content) {
+ my $gzipped_content = fetch_url('http://ftp.funet.fi/pub/CPAN/modules/02packages.details.txt.gz');
+ unless ($gzipped_content) {
die "Unable to read 02packages.details.txt from either your CPAN mirror or ftp.funet.fi";
}
+ IO::Uncompress::Gunzip::gunzip(\$gzipped_content, \$content, Transparent => 0)
+ or die "Can't gunzip content: $IO::Uncompress::Gunzip::GunzipError";
}
if ( $fh and !$content ) {