Skip Menu |

This queue is for tickets about the Class-C3 CPAN distribution.

Report information
The Basics
Id: 38798
Status: resolved
Priority: 0/
Queue: Class-C3

People
Owner: Nobody in particular
Requestors: rabbit+bugs [...] rabbit.us
Cc:
AdminCc:

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



Subject: Conflict warning with MRO::Compat on perl >= 5.9.5
I am not sure which of the two packages should be fixed, but if somebody with perl 5.10 first use's MRO::Compat and then use's Class::C3, the following warning is produced: Subroutine initialize redefined at /usr/share/perl5/Class/C3.pm line 70. Subroutine uninitialize redefined at /usr/share/perl5/Class/C3.pm line 88. Subroutine reinitialize redefined at /usr/share/perl5/Class/C3.pm line 101. This is due to MRO::Compat doing this: if($] < 5.009_005) { ... } # Load mro.pm and provide no-op Class::C3::.*initialize() funcs for 5.9.5+ else { require mro; no warnings 'redefine'; *Class::C3::initialize = sub { 1 }; *Class::C3::reinitialize = sub { 1 }; *Class::C3::uninitialize = sub { 1 }; } In case you are wondering how I got to this: package X; use base qw/Class::Accessor::Grouped/; # loads MRO::Compat package Y; use base qw/DBIx::Class::Schema/; # loads Class::C3