From: Jarkko Hietaniemi Date: Fri, 3 May 2002 13:51:11 +0000 (+0000) Subject: Update the EBCDIC MD5 checksums, and automate the process. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ff693ee8396df8f7ee40048430d2f30379f57f0;p=p5sagit%2Fp5-mst-13.2.git Update the EBCDIC MD5 checksums, and automate the process. p4raw-id: //depot/perl@16373 --- diff --git a/ext/Digest/MD5/t/files.t b/ext/Digest/MD5/t/files.t index e98256e..18d7009 100644 --- a/ext/Digest/MD5/t/files.t +++ b/ext/Digest/MD5/t/files.t @@ -15,13 +15,19 @@ use Digest::MD5 qw(md5 md5_hex md5_base64); # my $EXPECT; +# To update the EBCDIC section even on a Latin 1 platform, +# run this script with $ENV{EBCDIC_MD5SUM} set to a true value. +# (You'll need to have Perl 5.7.3 or later, to have the Encode installed.) +# (And remember that under the Perl core distribution you should +# also have the $ENV{PERL_CORE} set to a true value.) + if (ord "A" == 193) { # EBCDIC $EXPECT = <catfile($path, $file); } # print "# file = $file\n"; + unless (-f $file) { + warn "No such file: $file\n"; + next; + } + if ($ENV{EBCDIC_MD5SUM}) { + use Encode 'from_to'; + my $data = cat_file($file); + from_to($data, 'latin1', 'cp1047'); + print md5_hex($data), " $base\n"; + next; + } my $md5bin = pack("H*", $md5hex); my $md5b64; if ($B64) {