Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: ->SUPER::hi relies on __PACKAGE__ ? (monkeypatching)

by Athanasius (Archbishop)
on Jun 13, 2013 at 02:19 UTC ( [id://1038650]=note: print w/replies, xml ) Need Help??


in reply to ->SUPER::hi relies on __PACKAGE__ ? (monkeypatching) Can't locate object method "hi" via package "main::SUPER"

Yes. See “How SUPER is Resolved” in perlobj#Inheritance:

The SUPER pseudo-class is resolved from the package where the call is made. It is not resolved based on the object’s class. This is important, because it lets methods at different levels within a deep inheritance hierarchy each correctly call their respective parent methods.

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1038650]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-16 11:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found