Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 ( #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? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2022-09-29 00:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (125 votes). Check out past polls.

    Notices?