in reply to Weird inheritance and SUPER
You must be missing something here because Q::bar() attempts to call a superclass method's bar() but Q does not have any superclass. When you take Q::bar() out of the picture, perl goes to the next superclass of QPrime which is Pprime and follows its superclasses and finds P::bar() which behaves properly. If you declare a superclass for Q that contains a bar() method or remove the $self->SUPER::bar() from the existing Q::bar(), you should be OK.
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Weird inheritance and SUPER
by roundboy (Sexton) on Jan 22, 2003 at 02:41 UTC | |
by rir (Vicar) on Jan 22, 2003 at 03:44 UTC | |
by pfaut (Priest) on Jan 22, 2003 at 02:51 UTC | |
by dakkar (Hermit) on Jan 23, 2003 at 13:59 UTC | |
by roundboy (Sexton) on Feb 05, 2003 at 03:44 UTC |