From: Florian Ragwitz Date: Thu, 12 Mar 2009 15:34:01 +0000 (+0000) Subject: Port from Class::C3 to MRO::Compat. X-Git-Tag: v1.001000~29 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d91a39a92dd3810d2039abc8c0c3a4d42344622b;p=p5sagit%2FClass-C3-Componentised.git Port from Class::C3 to MRO::Compat. --- diff --git a/Makefile.PL b/Makefile.PL index f23f7f5..dae3913 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,7 +5,7 @@ all_from 'lib/Class/C3/Componentised.pm'; author 'Ash Berlin '; -requires 'Class::C3'; +requires 'MRO::Compat'; requires 'Class::Inspector'; requires 'Carp'; requires 'Test::Exception'; diff --git a/lib/Class/C3/Componentised.pm b/lib/Class/C3/Componentised.pm index ed0ac41..9d3f1fd 100644 --- a/lib/Class/C3/Componentised.pm +++ b/lib/Class/C3/Componentised.pm @@ -40,7 +40,7 @@ L. use strict; use warnings; -use Class::C3; +use MRO::Compat; use Class::Inspector; use Carp; @@ -163,11 +163,7 @@ sub inject_base { } } - # Yes, this is hack. But it *does* work. Please don't submit tickets about - # it on the basis of the comments in Class::C3, the author was on #dbix-class - # while I was implementing this. - - eval "package $target; import Class::C3;" unless exists $Class::C3::MRO{$target}; + mro::set_mro($target, 'c3'); } =head1 AUTHOR