in reply to Re: perspective and object-disorientation
in thread perspective and object-disorientation

Also, from a code re-entrancy requirement, since changes to @ISA are global, it would be very difficult for two sections of code that had different 'perspectives' to access the same set of objects at the same time.

While I don't think changing @ISA willy-nilly is a good idea, changes are global only if you choose to make them that way.

@ISA can be changed locally using... well... local :-) It can be a useful idiom when testing to make one object temporarily appear as another.

Replies are listed 'Best First'.
Changing @ISA at runtime
by pdcawley (Hermit) on Jan 19, 2003 at 22:39 UTC
    Changing @ISA can be a useful idiom when testing to make one object temporarily appear as another
    But only if you insist on trying to turn Perl into a pessimistically typed language. Us optimistic types just implement the appropriate methods and have done with it. But we've done this discussion already haven't we :)