tags 614873 + patch
kthxbye

Attached is a patch that removes the import of UNIVERSAL altogether and
changes the uses of isa to use the eval { $ref->isa('Foo') } form
recommended by the documentation.  Also fixed is the following warning
exposed by the testsuite:

  Use of qw(...) as parentheses is deprecated at 
/tmp/libuser-simple-perl-1.43/blib/lib/User/Simple/Admin.pm line 341.

Importing the two modules now occurs silently.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
diff -urN libuser-simple-perl-1.43.old/lib/User/Simple/Admin.pm libuser-simple-perl-1.43/lib/User/Simple/Admin.pm
--- libuser-simple-perl-1.43.old/lib/User/Simple/Admin.pm	2012-12-08 22:31:18.736722664 +0000
+++ libuser-simple-perl-1.43/lib/User/Simple/Admin.pm	2012-12-08 22:43:06.332062638 +0000
@@ -207,7 +207,6 @@
 
 use Carp;
 use Digest::MD5 qw(md5_hex);
-use UNIVERSAL qw(isa);
 our $AUTOLOAD;
 
 ######################################################################
@@ -220,7 +219,7 @@
     $table = shift;
 
     # Verify we got the right arguments
-    unless (isa($db, 'DBI::db')) {
+    unless (eval { $db->isa('DBI::db') }) {
 	carp "First argument must be a DBI connection";
 	return undef;
     }
@@ -339,7 +338,7 @@
 	    # sensitive. Gah, we work around that to provide the much more 
 	    # common lowercase fields... This might still have some problems
 	    # attached, please tell me if it breaks for you.
-	    for my $case qw(id ID Id iD) {
+	    for my $case (qw(id ID Id iD)) {
 		if (exists $row->{$case}) {
 		    $id = $row->{$case};
 		    last;
diff -urN libuser-simple-perl-1.43.old/lib/User/Simple.pm libuser-simple-perl-1.43/lib/User/Simple.pm
--- libuser-simple-perl-1.43.old/lib/User/Simple.pm	2012-12-08 22:31:18.736722664 +0000
+++ libuser-simple-perl-1.43/lib/User/Simple.pm	2012-12-08 22:38:06.961923734 +0000
@@ -168,7 +168,6 @@
 use Carp;
 use Date::Calc qw(Today_and_Now Add_Delta_DHMS Delta_DHMS);
 use Digest::MD5 qw(md5_hex);
-use UNIVERSAL qw(isa);
 
 our $AUTOLOAD;
 our $VERSION = '1.43';
@@ -198,7 +197,7 @@
     $init{debug} = 2 unless defined $init{debug};
     $init{adm_level} = 1 unless defined $init{adm_level};
 
-    unless (defined($init{db}) and isa($init{db}, 'DBI::db')) {
+    unless (defined($init{db}) and eval { $init{db}->isa('DBI::db') }) {
 	carp "Mandatory db argument must be a valid (DBI) database handle";
 	return undef;
     }

Attachment: signature.asc
Description: Digital signature

Reply via email to