Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Using a base module with a required version

by ikegami (Patriarch)
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 (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;.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
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 pondering the Monastery: (3)
As of 2023-09-22 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?