Skip Menu |

This queue is for tickets about the Parse-CPAN-Packages CPAN distribution.

Report information
The Basics
Id: 53343
Status: resolved
Priority: 0/
Queue: Parse-CPAN-Packages

People
Owner: Nobody in particular
Requestors: vpit [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.31
Fixed in: (no value)



Subject: Turn off crlf translation when slurping the package files
The package file can't properly be uncompressed on Windows because it isn't read in binary mode. The testsuite doesn't catch this because it uses a text package file.
The attached patch properly calls binmode on the filehandles.

Vincent.
Subject: Parse-CPAN-Packages-binmode.patch
--- lib/Parse/CPAN/Packages.pm 2009-04-23 12:56:07.000000000 +0200 +++ lib/Parse/CPAN/Packages.pm 2010-01-04 16:34:59.000000000 +0100 @@ -39,6 +39,7 @@ return $filename; } elsif ( $filename =~ /\.gz/ ) { open( IN, $filename ) || die "Failed to read $filename: $!"; + binmode *IN; my $data = join '', <IN>; close(IN); return Compress::Zlib::memGunzip($data); @@ -46,8 +47,10 @@ return Compress::Zlib::memGunzip($filename); } else { open( IN, $filename ) || die "Failed to read $filename: $!"; - return join '', <IN>; + binmode *IN; + my $data = join '', <IN>; close(IN); + return $data; } }
Thanks, this patch has been integrated into and released with V2.32.