Update Digest-SHA to CPAN version 5.50
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Tue, 14 Dec 2010 18:56:42 +0000 (18:56 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Tue, 14 Dec 2010 18:57:20 +0000 (18:57 +0000)
  [DELTA]

  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

Porting/Maintainers.pl
cpan/Digest-SHA/Changes
cpan/Digest-SHA/README
cpan/Digest-SHA/lib/Digest/SHA.pm
cpan/Digest-SHA/shasum
cpan/Digest-SHA/src/hmac.c
cpan/Digest-SHA/src/hmac.h
cpan/Digest-SHA/src/sha.c
cpan/Digest-SHA/src/sha.h
pod/perldelta.pod

index 32efb16..9685138 100755 (executable)
@@ -499,7 +499,7 @@ use File::Glob qw(:case);
     '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',
index a919f7c..2377e28 100644 (file)
@@ -1,5 +1,12 @@
 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 '/'
index df42872..7551e32 100644 (file)
@@ -1,4 +1,4 @@
-Digest::SHA version 5.49
+Digest::SHA version 5.50
 ========================
 
 Digest::SHA is a complete implementation of the NIST Secure Hash
index 01a6313..798ef34 100644 (file)
@@ -7,7 +7,7 @@ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
 use Fcntl;
 use integer;
 
-$VERSION = '5.49';
+$VERSION = '5.50';
 
 require Exporter;
 require DynaLoader;
@@ -114,14 +114,12 @@ sub Addfile {
        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) {
@@ -140,8 +138,8 @@ sub Addfile {
                        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;
index c024ff2..13d4ca3 100644 (file)
@@ -4,8 +4,8 @@
        ##
        ## 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
 
@@ -74,7 +74,7 @@ use strict;
 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,
@@ -237,12 +237,10 @@ sub verify {
        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/^\\//;
index c57dcb5..bd92cfb 100644 (file)
@@ -5,8 +5,8 @@
  *
  * 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
  *
  */
 
index 44fa9dd..ec466f9 100644 (file)
@@ -5,8 +5,8 @@
  *
  * 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
  *
  */
 
index a556b05..af6e389 100644 (file)
@@ -5,8 +5,8 @@
  *
  * 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
  *
  */
 
index 9f07bc9..2029813 100644 (file)
@@ -5,8 +5,8 @@
  *
  * 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
  *
  */
 
index 2084b7f..bdd6e21 100644 (file)
@@ -226,7 +226,7 @@ XXX
 
 =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.