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
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');