No, SUPER is based on __PACKAGE__, not on ref($self). Quote perlobj,
It is important to note that SUPER refers to the superclass(es) of the current package and not to the superclass(es) of the object.
This is easy to demonstrate.
{ package Base; sub m { print("Boo!\n"); } } { package Child; our @ISA = 'Base'; bless({}, 'Anything')->SUPER::m(); # Boo! }
In reply to Re^3: Inheritance - parent of parent
by ikegami
in thread Inheritance - parent of parent (solved)
by jockel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |