in reply to Why can't I call SUPER from user code?
Because there isn't just one SUPER: perl needs to know what class you want the superclass of. If you tell it, perl will be happy:
$foo1->bang(); $foo2->bang(); { package BAZ; $foo3->SUPER::bang(); }
This is needed because you may have another class:
.. which means that BAR::bang() may be called by objects that don't have ref($self) eq 'BAR'.package QUUX; use base qw/ BAR /; sub bang { shift->SUPER::bang }
Hugo
|
|---|