Subject: | $name is not passed consistently |
Version: 1.02
Perl: This is perl, v5.8.4 built for i386-linux-thread-multi
Internally, $name isn't passed around very consistently. This patch adds $name to all those places where it isn't passed.
Sincerely,
Allard Hoeve
Only in Carp-Assert-More-1.02/: Makefile.old
diff -urb Carp-Assert-More-1.02/More.pm orig/libcarp-assert-more-perl-1.02/More.pm
--- Carp-Assert-More-1.02/More.pm 2004-10-18 15:39:01.000000000 +0200
+++ orig/libcarp-assert-more-perl-1.02/More.pm 2004-10-18 15:40:51.000000000 +0200
@@ -365,7 +365,7 @@
my $name = shift;
assert_nonref($string, $name);
- assert_isa( $regex, 'Regexp', $name );
+ assert_isa( $regex, 'Regexp' );
if (!($string =~ $regex)) {
require Carp;
&Carp::confess( _fail_msg($name) );
@@ -386,10 +386,10 @@
my $arrayref = shift;
my $name = shift;
- assert_nonref($string, $name);
- assert_isa( $arrayref, 'ARRAY', $name );
+ assert_nonref($string);
+ assert_isa( $arrayref, 'ARRAY' );
foreach my $element (@{$arrayref}) {
- assert_nonref($element, $name);
+ assert_nonref($element);
return if $string eq $element;
}
require Carp;
@@ -415,7 +415,7 @@
my $key = shift;
my $name = shift;
- assert_isa( $hash, 'HASH', $name );
+ assert_isa( $hash, 'HASH' );
my @list = ref($key) ? @$key : ($key);
for ( @list ) {
@@ -452,7 +452,7 @@
my $ref = shift;
my $name = shift;
- return assert_isa($ref, 'HASH', $name);
+ return assert_isa($ref, 'HASH');
}
=head2 assert_listref( $ref [,$name] )
@@ -469,7 +469,7 @@
my $ref = shift;
my $name = shift;
- return assert_isa($ref, 'ARRAY', $name);
+ return assert_isa($ref, 'ARRAY');
}
=head1 AUTHOR