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

Re^2: Can locate when called directly, but can't when in @ISA

by almut (Canon)
on Oct 05, 2007 at 13:01 UTC ( [id://642913]=note: print w/replies, xml ) Need Help??


in reply to Re: Can locate when called directly, but can't when in @ISA
in thread Can locate when called directly, but can't when in @ISA

You can do both by using the 'base' pragma

... but before switching to "use base", the OP may want to form his own opinion about the objections a couple of renowned monks have had in the thread 'base' versus @ISA, why?.

Replies are listed 'Best First'.
Re^3: Can locate when called directly, but can't when in @ISA
by perlfan (Vicar) on Oct 05, 2007 at 14:34 UTC
    That was helpful information, but I am no an OOP super freak either. For my needs, use base 'parent'; works perfectly and I am able to easily augment the parent's creation class with out any problems:
    use base 'My::Parent::Class'; sub new { my $pkg = shift; my $self = $pkg->SUPER::new(@_); return $self; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-19 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found