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

I'm not sure what you're trying to avoid. It's is precisely necessary to set @ISA to declare inheritance. What problem do you think you're trying to solve?

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

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

Replies are listed 'Best First'.
Re: •Re: Avoiding the Use of @ISA = qw(Foo::Bar);
by hardburn (Abbot) on Jul 14, 2003 at 18:07 UTC

    I want an extra layer of indirection between me and @ISA, because I don't like assuming that @ISA was already empty when I said our @ISA = qw(Foo);. use base provides that layer and gives you a little extra stuff.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated

      Yes, but who else would set it, other than your definition of your module? You need to have one place in your program with a clear declaration of the inheritance of that class.

      -- Randal L. Schwartz, Perl hacker
      Be sure to read my standard disclaimer if this is a reply.