in reply to can('SUPER::defaults')
Thanks for your replies. I summarize here.
I see the problem was that I thought the SUPER::defaults() method applied to the object it was called on. As noted by "Anonymous Monk", pike, and demerphq (who referenced `perldoc perlobj`), SUPER:: is relative to the package containing the SUPER:: construct and not the package of the object that called it.
It seems, then, that one would basically rewrite the functionality of can(), which tye said is probably not worth it. In fact, I like tye's solution, the goal being to simplify the coding of subclasses (why else use OO? :).
Finally, the (welcome) criticisms.
Again, thanks for everyone's help.
|
|---|