[Bast-commits] r9836 - in Class-C3-Componentised/trunk: .
lib/Class/C3
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Thu Feb 24 18:01:00 GMT 2011
Author: ribasushi
Date: 2011-02-24 18:01:00 +0000 (Thu, 24 Feb 2011)
New Revision: 9836
Modified:
Class-C3-Componentised/trunk/Changes
Class-C3-Componentised/trunk/lib/Class/C3/Componentised.pm
Log:
Stupid regression - the primitive $isa{$_} does not take in consideration the ISA of added parents
Modified: Class-C3-Componentised/trunk/Changes
===================================================================
--- Class-C3-Componentised/trunk/Changes 2011-02-24 14:42:41 UTC (rev 9835)
+++ Class-C3-Componentised/trunk/Changes 2011-02-24 18:01:00 UTC (rev 9836)
@@ -1,5 +1,8 @@
Revision history for Class-C3-Componentised
+ Fix inject_base regression introduced during optimizations in
+ 1.0007
+
1.0007 23 Feb 2011
Throw a readable exception when load_optional_class is given an
invalid class name
Modified: Class-C3-Componentised/trunk/lib/Class/C3/Componentised.pm
===================================================================
--- Class-C3-Componentised/trunk/lib/Class/C3/Componentised.pm 2011-02-24 14:42:41 UTC (rev 9835)
+++ Class-C3-Componentised/trunk/lib/Class/C3/Componentised.pm 2011-02-24 18:01:00 UTC (rev 9836)
@@ -188,13 +188,10 @@
my $class = shift;
my $target = shift;
- my %isa = map { $_ => 1 } ($target, @{mro::get_linear_isa($target)} );
-
for (reverse @_) {
no strict 'refs';
- unless ($isa{$_}++) {
- unshift ( @{"${target}::ISA"}, $_ );
- }
+ unshift ( @{"${target}::ISA"}, $_ )
+ unless ($target eq $_ || $target->isa($_));
}
mro::set_mro($target, 'c3');
More information about the Bast-commits
mailing list