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