Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Using a base module with a required version

by ikegami (Pope)
on Aug 02, 2019 at 21:35 UTC ( #11103785=note: print w/replies, xml ) Need Help??


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 (Canon) 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;.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11103785]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2021-03-08 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (123 votes). Check out past polls.

    Notices?