in reply to Re: Avoiding the Use of @ISA = qw(Foo::Bar);
in thread Avoiding the Use of @ISA = qw(Foo::Bar);

Eh, if I define a class, I sure don't want someone else to define what I am inheriting.

It's nice to be able to do so, though. Some classes are a pain to inherit from and adding your own class to its @INC sometimes saves a lot of time. And IMHO, it's less ugly than defining subs in the other package (and the @ISA solution adds nice ->isa() magic, which can come in handy).

Manipulating someone else's @ISA makes fun things like http://use.perl.org/~Matts/journal/12896 possible :)

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

  • Comment on Re: Re: Avoiding the Use of @ISA = qw(Foo::Bar);