Subject: | Missing binmode on filehandle causes invalid checksums on Windows. |
Date: | Wed, 03 Sep 2008 07:31:11 -0500 |
To: | bug-CPAN-Checksums [...] rt.cpan.org |
From: | Elliot Shank <perl [...] galumph.com> |
Patch is against version 2.00.
--- lib/CPAN/Checksums.pm 2008-05-17 00:15:20.000000000 -0500
+++ lib/CPAN/Checksums.pm.fixed 2008-09-03 07:23:41.000000000 -0500
@@ -219,6 +219,7 @@
my($fh) = new IO::File;
my $dig = $module->new(@$constructor_args);
$fh->open("$abs\0") or die "Couldn't open $abs: $!";
+ $fh->binmode();
$dig->addfile($fh);
$fh->close;
my $digest = $dig->hexdigest;