[otrs-cvs] otrs/Kernel/cpan-lib/Digest/SHA PurePerl.pm,1.6,1.7

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/Kernel/cpan-lib/Digest/SHA
In directory lancelot:/tmp/cvs-serv4799/Digest/SHA

Modified Files:
	PurePerl.pm 
Log Message:
Updated CPAN module Digest::SHA::PurePerl to version 5.81.

Author: mh

Index: PurePerl.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/cpan-lib/Digest/SHA/PurePerl.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -2 -u -d -r1.6 -r1.7
--- PurePerl.pm	30 Oct 2012 13:23:52 -0000	1.6
+++ PurePerl.pm	15 Jan 2013 12:31:52 -0000	1.7
@@ -9,5 +9,5 @@
 use FileHandle;
 
-$VERSION = '5.72';
+$VERSION = '5.81';
 
 require Exporter;
@@ -584,4 +584,12 @@
 }
 
+sub _downgrade {
+	eval { utf8::downgrade($_[0]) };
+	if ($@ && $@ =~ /Wide character/) {
+		require Carp;
+		Carp::croak('Wide character in subroutine entry');
+	}
+}
+
 my $MWS = 16384;
 
@@ -589,4 +597,5 @@
 	my($bytestr_r, $bytecnt, $self) = @_;
 	return(0) unless $bytecnt > 0;
+	{ no integer; _downgrade($$bytestr_r) unless $] < 5.008 }
 	return(_shawrite($$bytestr_r, $bytecnt<<3, $self)) if $bytecnt <= $MWS;
 	my $offset = 0;
@@ -750,4 +759,5 @@
 	$self->{isha} = _shaopen($alg) or return;
 	$self->{osha} = _shaopen($alg) or return;
+	{ no integer; _downgrade($key) unless $] < 5.008 }
 	if (length($key) > $self->{osha}->{blocksize} >> 3) {
 		$self->{ksha} = _shaopen($alg) or return;
@@ -959,6 +969,7 @@
 sub dump {
 	my $self = shift;
-	my $file = shift || "";
+	my $file = shift;
 
+	$file = "" unless defined $file;
 	_shadump($file, $self) or return;
 	return($self);
@@ -967,5 +978,7 @@
 sub load {
 	my $class = shift;
-	my $file = shift || "";
+	my $file = shift;
+
+	$file = "" unless defined $file;
 	if (ref($class)) {	# instance method
 		my $self = _shaload($file) or return;
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.