Bug#526163: libclass-c3-perl: "Redefined" warnings when loading both Moose and DBIx::Class
Thomas Equeter
tequeter at straton-it.fr
Wed Apr 29 17:10:16 UTC 2009
Package: libclass-c3-perl
Version: 0.19-2.1
Severity: minor
Tags: patch
Hello,
There are "redefined warnings when Class::C3 is loaded explicitly after
MRO::Compat has been loaded" (from the upstream changelog).
How to reproduce, using the stable Moose (0.54-1) and DBIx::Class
(0.08010-2):
$ perl -MMoose -MDBIx::Class -e1
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.
Suggested fix: apply the attached patch, taken from the upstream 0.19 ->
0.20 changeset.
Thanks,
-Thomas Equeter.
-- System Information:
Debian Release: 5.0.1
APT prefers stable
APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libclass-c3-perl depends on:
ii libalgorithm-c3-perl 0.07-1 A module for merging hierarchies u
ii libtest-exception-perl 0.27-1 Test functions for exception based
ii perl 5.10.0-19 Larry Wall's Practical Extraction
Versions of packages libclass-c3-perl recommends:
ii libclass-c3-xs-perl 0.08-2+b1 XS speedups for Class::C3
libclass-c3-perl suggests no packages.
-- no debconf information
-------------- next part --------------
--- Class-C3-0.19/lib/Class/C3.pm 2007-06-04 07:22:43.000000000 +0200
+++ Class-C3-0.20/lib/Class/C3.pm 2008-12-08 04:42:31.000000000 +0100
@@ -67,6 +67,11 @@
## initializers
+# This prevents silly warnings when Class::C3 is
+# used explicitly along with MRO::Compat under 5.9.5+
+
+{ no warnings 'redefine';
+
sub initialize {
%next::METHOD_CACHE = ();
# why bother if we don't have anything ...
@@ -100,6 +105,8 @@
sub reinitialize { goto &initialize }
+} # end of "no warnings 'redefine'"
+
## functions for applying C3 to classes
sub _calculate_method_dispatch_tables {
More information about the pkg-perl-maintainers
mailing list