[Bast-commits] r5741 - in Class-C3-Componentised/trunk: . lib/Class/C3

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Thu Mar 12 15:34:02 GMT 2009


Author: rafl
Date: 2009-03-12 15:34:01 +0000 (Thu, 12 Mar 2009)
New Revision: 5741

Modified:
   Class-C3-Componentised/trunk/Makefile.PL
   Class-C3-Componentised/trunk/lib/Class/C3/Componentised.pm
Log:
Port from Class::C3 to MRO::Compat.

Modified: Class-C3-Componentised/trunk/Makefile.PL
===================================================================
--- Class-C3-Componentised/trunk/Makefile.PL	2009-03-12 15:08:43 UTC (rev 5740)
+++ Class-C3-Componentised/trunk/Makefile.PL	2009-03-12 15:34:01 UTC (rev 5741)
@@ -5,7 +5,7 @@
 author    'Ash Berlin <ash at cpan.org>';
 
 
-requires  'Class::C3';
+requires  'MRO::Compat';
 requires  'Class::Inspector';
 requires  'Carp';
 requires  'Test::Exception';

Modified: Class-C3-Componentised/trunk/lib/Class/C3/Componentised.pm
===================================================================
--- Class-C3-Componentised/trunk/lib/Class/C3/Componentised.pm	2009-03-12 15:08:43 UTC (rev 5740)
+++ Class-C3-Componentised/trunk/lib/Class/C3/Componentised.pm	2009-03-12 15:34:01 UTC (rev 5741)
@@ -40,7 +40,7 @@
 use strict;
 use warnings;
 
-use Class::C3;
+use MRO::Compat;
 use Class::Inspector;
 use Carp;
 
@@ -163,11 +163,7 @@
     }
   }
 
-  # 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




More information about the Bast-commits mailing list