Skip Menu |

This queue is for tickets about the User-Simple CPAN distribution.

Report information
The Basics
Id: 103957
Status: open
Priority: 0/
Queue: User-Simple

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.45
Fixed in: (no value)



Subject: UNIVERSAL does not export anything
The module does not work anymore with perl 5.21.x (note that the next stable perl will be released in a few weeks): Output from './Build test': # Failed test 'use User::Simple;' # at t/User-Simple.t line 14. # Tried to use 'User::Simple'. # Error: UNIVERSAL does not export anything at /tmpfs/.cpan-build/User-Simple-1.45-1IaYCY/blib/lib/User/Simple.pm line 173. # BEGIN failed--compilation aborted at /tmpfs/.cpan-build/User-Simple-1.45-1IaYCY/blib/lib/User/Simple.pm line 173. # Compilation failed in require at t/User-Simple.t line 14. # BEGIN failed--compilation aborted at t/User-Simple.t line 14. # Failed test 'use User::Simple::Admin;' # at t/User-Simple.t line 14. # Tried to use 'User::Simple::Admin'. # Error: UNIVERSAL does not export anything at /tmpfs/.cpan-build/User-Simple-1.45-1IaYCY/blib/lib/User/Simple/Admin.pm line 212. # BEGIN failed--compilation aborted at /tmpfs/.cpan-build/User-Simple-1.45-1IaYCY/blib/lib/User/Simple/Admin.pm line 212. # Compilation failed in require at t/User-Simple.t line 14. # BEGIN failed--compilation aborted at t/User-Simple.t line 14. Can't locate object method "create_plain_db_structure" via package "User::Simple::Admin" at t/User-Simple.t line 35. # Looks like you planned 40 tests but ran 2. # Looks like you failed 2 tests of 2 run. # Looks like your test exited with 2 just after 2. t/User-Simple.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 40/40 subtests t/pod.t .......... ok Test Summary Report ------------------- t/User-Simple.t (Wstat: 512 Tests: 2 Failed: 2) Failed tests: 1-2 Non-zero exit status: 2 Parse errors: Bad plan. You planned 40 tests but ran 2. Files=2, Tests=4, 1 wallclock secs ( 0.01 usr 0.01 sys + 0.10 cusr 0.02 csys = 0.14 CPU) Result: FAIL Failed 1/2 test programs. 2/4 subtests failed.
Here's a patch. Cheers, gregor, Debian Perl Group
Subject: UNIVERSAL-import-deprecated.patch
Description: fix for "UNIVERSAL->import is deprecated and will be removed in a future perl at ..." (5.20) "Error: UNIVERSAL does not export anything" (5.22) Origin: vendor Bug: https://rt.cpan.org/Public/Bug/Display.html?id=103957 Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=103957 Author: gregor herrmann <gregoa@debian.org> Last-Update: 2015-05-29 diff --git a/lib/User/Simple.pm b/lib/User/Simple.pm index 108e93b..16e471b 100644 --- a/lib/User/Simple.pm +++ b/lib/User/Simple.pm @@ -170,7 +170,6 @@ terms as Perl. 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.45'; @@ -200,7 +199,7 @@ sub new { $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 $init{db}->isa('DBI::db')) { carp "Mandatory db argument must be a valid (DBI) database handle"; return undef; } diff --git a/lib/User/Simple/Admin.pm b/lib/User/Simple/Admin.pm index 1b25545..14303e3 100644 --- a/lib/User/Simple/Admin.pm +++ b/lib/User/Simple/Admin.pm @@ -209,7 +209,6 @@ terms as Perl. use Carp; use Digest::MD5 qw(md5_hex); -use UNIVERSAL qw(isa); our $AUTOLOAD; ###################################################################### @@ -222,7 +221,7 @@ sub new { $table = shift; # Verify we got the right arguments - unless (isa($db, 'DBI::db')) { + unless ($db->isa('DBI::db')) { carp "First argument must be a DBI connection"; return undef; }