in reply to Inheritance confused
You do not need to keep a reference to the parent, that's what SUPER does for you. In the Lite.pm constructor, drop the parent and in the methods, just
that construct will move up the inheritance tree to find the next chkAccessRight method. This construct$self->SUPER::chkAccessRight
asks the *parent* object to move up it's hierarchy to find the method. Since the parent is the base, there's nowhere to move up to.$self->{Parent}->SUPER::chkAccessRight
-derby
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Inheritance confused
by exilepanda (Friar) on Dec 07, 2015 at 14:22 UTC | |
by derby (Abbot) on Dec 07, 2015 at 14:34 UTC | |
by Apero (Scribe) on Dec 07, 2015 at 17:12 UTC | |
by exilepanda (Friar) on Dec 08, 2015 at 07:03 UTC |
In Section
Seekers of Perl Wisdom