in reply to Inheritance - calling parent constructor

use Exporter; use vars qw(@ISA); @ISA = qw(Parent);

Did you actually mean to say use Exporter, or rather use Parent?   Just in case it hasn't become quite clear from the other replies, there is no reason to load Exporter if all you want is inheritance (except if you want to inherit from Exporter itself, of course).

Replies are listed 'Best First'.
Re^2: Inheritance - calling parent constructor
by bob_dobalina (Sexton) on Dec 29, 2009 at 19:17 UTC
    Did you actually mean to say use Exporter, or rather use Parent? Just in case it hasn't become quite clear from the other replies, there is no reason to load Exporter if all you want is inheritance (except if you want to inherit from Exporter itself, of course).

    - No, I thought you had to use Exporter to use @ISA. Thanks for the correction. i went with use base as it seems like a clearer solution.
      I prefer parent over base since it doesn't hide errors, but I don't see the point of using a module to replace
      use Foo; our @ISA = 'Foo';

      It's only one line longer, and I don't buy that the module is any clearer.