http://qs321.pair.com?node_id=11103785


in reply to Using a base module with a required version

use Juliet 1.1; use base 'Juliet';

But base has issues avoided by using parent.

use Juliet 1.1; use parent 'Juliet';

But I don't see the point of using either.

use Juliet 1.1; our @ISA = 'Juliet';

Replies are listed 'Best First'.
Re^2: Using a base module with a required version
by talexb (Chancellor) on Aug 03, 2019 at 03:59 UTC

    Saying it this way

    use Juliet 1.1; our @ISA = 'Juliet';
    actually makes the most sense to me -- but I'm uneasy about twiddling with @ISA since that's how Perl gets told about inheritance.

    Hiding @ISA with your middle example

    use Juliet 1.1; use parent 'Juliet';
    is less alarming -- but it seems like it does the same thing.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

      I'm uneasy about twiddling with @ISA since that's how Perl gets told about inheritance.

      I've very confused. Isn't that exactly what you want to do?

      If not, you shouldn't be using base.pm or parent.pm or @ISA, just use Juliet 1.1;.