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';
In reply to Re: Weird inheritance and SUPER
by pfaut
in thread Weird inheritance and SUPER
by roundboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |