'Digest::SHA' =>
{
'MAINTAINER' => 'mshelor',
- 'DISTRIBUTION' => 'MSHELOR/Digest-SHA-5.49.tar.gz',
+ 'DISTRIBUTION' => 'MSHELOR/Digest-SHA-5.50.tar.gz',
'FILES' => q[cpan/Digest-SHA],
'EXCLUDED' => [ qw{t/pod.t t/podcover.t examples/dups} ],
'UPSTREAM' => 'cpan',
Revision history for Perl extension Digest::SHA.
+5.50 Tue Dec 14 06:20:08 MST 2010
+ - adopted convention that '-' always means STDIN
+ -- actual filename '-' accessed as './-'
+ -- accords with behavior of sha1sum/md5sum
+ - corrected undefined subroutine oversight in shasum
+ -- inadvertent migration of _bail() from SHA.pm
+
5.49 Sun Dec 12 07:22:04 MST 2010
- modified Addfile to accept all POSIX filenames
-- standard allows all characters except NUL and '/'
-Digest::SHA version 5.49
+Digest::SHA version 5.50
========================
Digest::SHA is a complete implementation of the NIST Secure Hash
use Fcntl;
use integer;
-$VERSION = '5.49';
+$VERSION = '5.50';
require Exporter;
require DynaLoader;
my ($binary, $portable) = map { $_ eq $mode } ("b", "p");
my $text = -T $file;
- ## Use sysopen to accommodate full range of POSIX
- ## file names; fall back to open for magic (-)
+ ## Always interpret "-" to mean STDIN; otherwise use
+ ## sysopen to handle full range of POSIX file names
local *FH;
- unless (sysopen(FH, $file, O_RDONLY)) {
- unless ($file eq '-' && open(FH, '<&STDIN')) {
- _bail("Open failed");
- }
- }
+ $file eq '-' and open(FH, '< -')
+ or sysopen(FH, $file, O_RDONLY)
+ or _bail('Open failed');
binmode(FH) if $binary || $portable;
unless ($portable && $text) {
last unless $n2;
$buf1 .= $buf2;
}
- $buf1 =~ s/\015?\015\012/\012/g; # DOS/Windows
- $buf1 =~ s/\015/\012/g; # early MacOS
+ $buf1 =~ s/\015?\015\012/\012/g; # DOS/Windows
+ $buf1 =~ s/\015/\012/g; # early MacOS
$self->add($buf1);
}
_bail("Read failed") unless defined $n1;
##
## Copyright (C) 2003-2010 Mark Shelor, All Rights Reserved
##
- ## Version: 5.49
- ## Sun Dec 12 07:22:04 MST 2010
+ ## Version: 5.50
+ ## Tue Dec 14 06:20:08 MST 2010
=head1 NAME
use FileHandle;
use Getopt::Long;
-my $VERSION = "5.49";
+my $VERSION = "5.50";
## Try to use Digest::SHA, since it's faster. If not installed,
my ($bslash, $sum, $fname, $rsp, $digest);
local *FH;
- unless (sysopen(FH, $checkfile, O_RDONLY)) {
- unless ($checkfile eq '-' && open(FH, '<&STDIN')) {
- _bail("Open failed");
- }
- $checkfile = 'standard input';
- }
+ $checkfile eq '-' and open(FH, '< -')
+ and $checkfile = 'standard input'
+ or sysopen(FH, $checkfile, O_RDONLY)
+ or die "shasum: $checkfile: $!\n";
while (<FH>) {
next if /^#/; s/\n$//; s/^[ \t]+//; $num_lines++;
$bslash = s/^\\//;
*
* Copyright (C) 2003-2010 Mark Shelor, All Rights Reserved
*
- * Version: 5.49
- * Sun Dec 12 07:22:04 MST 2010
+ * Version: 5.50
+ * Tue Dec 14 06:20:08 MST 2010
*
*/
*
* Copyright (C) 2003-2010 Mark Shelor, All Rights Reserved
*
- * Version: 5.49
- * Sun Dec 12 07:22:04 MST 2010
+ * Version: 5.50
+ * Tue Dec 14 06:20:08 MST 2010
*
*/
*
* Copyright (C) 2003-2010 Mark Shelor, All Rights Reserved
*
- * Version: 5.49
- * Sun Dec 12 07:22:04 MST 2010
+ * Version: 5.50
+ * Tue Dec 14 06:20:08 MST 2010
*
*/
*
* Copyright (C) 2003-2010 Mark Shelor, All Rights Reserved
*
- * Version: 5.49
- * Sun Dec 12 07:22:04 MST 2010
+ * Version: 5.50
+ * Tue Dec 14 06:20:08 MST 2010
*
*/
=item *
-C<Digest::SHA> has been upgraded from 5.48 to 5.49
+C<Digest::SHA> has been upgraded from 5.48 to 5.50
shasum now more closely mimics sha1sum/md5sum and Addfile
accepts all POSIX filenames.