Angel has asked for the wisdom of the Perl Monks concerning the following question:
I have a whole bevy of objects and have been learning recently how to do inheritance, my problem has to do with calling internal methods since they dont get the $self as their first argument so things like accesing the object hash fail.
#assume new method has been called sub foo # the public method { my $self = shift; &bar( "do something" ); } sub bar # the private method { $self{new} = $_[0]; }
This does not seem to work what I would like to learn is how to get at the $self object from inside bar hopefully without passing it as a calling argument and is there anything that needs to be done about calling a method in a parent class?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inheritance and Internal object methods
by dws (Chancellor) on Jun 29, 2003 at 21:52 UTC | |
|
Re: Inheritance and Internal object methods
by fglock (Vicar) on Jun 29, 2003 at 21:45 UTC |