> Here is my suggestion: What if other functions were able to backtrace
   > context and determine how many arguments to return just like split can?

I have an RFC on that:

        RFC 21: Replace C<wantarray> with a generic C<want> function

        C<want> takes a list of strings that describe aspects of the
        context in which the current subroutine has been called. It
        returns a list indicating whether or not the current
        subroutine's call context matches all the aspects specified in
        the list ... at least one integer element is returned.

        That integer (the "expectation count") indicates the number of
        return values expected by the context. 

Damian

Reply via email to