At the risk of breaking ranks here, I will attempt to help actually answer your question ...
*grin*
Does anyone know how to reliably extract the name of the calling method, so that I can ommit that from the calls to the NEXT method?While I understand your hesitancy with AUTOLOAD, it would remove this entire problem.
Perhaps we're not talking about the same "problem."
The built-in syntax for an empty wrapper is:
sub compile { (shift)->SUPER::compile(@_) }
The syntax I'm currently using is:
sub compile { (shift)->NEXT('compile', @_) }
What I'm hoping for is to omit the method name and have it picked up from context:
sub compile { (shift)->NEXT(@_) }
All of the AUTOLOADed solutions seem like they'll still require the current method name to be specified:
sub compile { (shift)->SUPER::DISPATCH::compile(@_) }
Admittedly, it's a minor point, but if you're going to have a rule that says that you can't redispatch to a different method name, it seems gauche to make the caller write out the method name again.
In reply to Re^2: Solving the SUPER problem in Mixins with a Dispatch Method
by simonm
in thread Solving the SUPER problem in Mixins with a Dispatch Method
by simonm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |