in reply to Avoiding the Use of @ISA = qw(Foo::Bar);
As Randal hints, @ISA is a package variable. If it's set somewhere else and you whack it with your code above, the other code is wrong. I'd dearly love to see an example of where this has bitten you.
Update: If "assuming it's empty" is really a problem (if it's not empty, I'll continue to argue that there's a problem elsewhere in your code), use push or unshift, as base does. Of course, if that gets the ordering wrong, you still have problems and I don't think anything you do will solve them, short of finding out where the real problem is and fixing it.
|
|---|