my ($class, $target, @to_inject) = @_;
{
no strict 'refs';
- unshift(@{"${target}::ISA"}, grep { $target ne $_ && !$target->isa($_)} @to_inject);
+ my %seen;
+ unshift( @{"${target}::ISA"},
+ grep { !$seen{ $_ }++ && $target ne $_ && !$target->isa($_) }
+ @to_inject
+ );
}
# Yes, this is hack. But it *does* work. Please don't submit tickets about