From: Leon Brocard Date: Mon, 18 Jul 2011 11:13:20 +0000 (+0100) Subject: Make Porting/corelist.pl fetch gzipped 02packages.details.txt from CPAN X-Git-Tag: accepted/trunk/20130322.191538~3267 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9168ed13c3995a6f331c932c952ea164026411f0;p=platform%2Fupstream%2Fperl.git Make Porting/corelist.pl fetch gzipped 02packages.details.txt from CPAN --- diff --git a/Porting/corelist.pl b/Porting/corelist.pl index f524d3e..ead044b 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 ) {