Sam Vilain wrote:
It seems these requirements are still in conflict;
- Preserving AUTOLOAD thou-shalt-make-the-call semantics
- Keeping the new $AUTOLOAD off the argument stack for AUTOLOAD()
- Use of $_ as an out-of-band way of passing arguments to a function
cannot be localised due to the non-stack-like characteristic of
the call stack, in the face of continuations and coroutines
- disallowing "explicit" out-of-band arguments
Time to re-think the out-of-band arguments idea?
I never liked the idea of out-of-band arguments. Either something is
passed, is available due to being in a broader scope, or can be gleamed
In this case, I think introspection is the answer. Hang the info off
&?SUB or caller. Something like "&?SUB.Invocation" or "caller.call"
could be made to return something useful, I think. Also makes the info
available for more than just AUTO.* methods, which opens the door up for
all kinds of useful perversions, especially in the age of bindings and such.
I leave the definition of "something useful" to others.
-- Rod Adams