update: I had no idea that wantarray was a function when I first wrote this response... I figured that was pseudo-code or something. :) Who knew (besides merlyn and everyone)?
This is sorta what we've been thinkin' about doing, where the wantarray would get decided depending on weather or not the function was called with _r or _ra, but I really really wanted a way where we didn't have to specify the wantarray... that it would just figure it out on it's own ...
oh well eh... *sigh*
we were also thinkin' like:
Which is a solution we just came up with a little while ago ... I can't think of any reason why it wouldn't work since it would probably work with hashes, arrays, scalars, and ... what else is there? Can you think of an reason why this method is dumb?API->new_way; my @ret = $func->(@_); API->old_way; return @ret==1 ? $ret[0] : @ret;
In reply to Re: Re: uber-reference
by jettero
in thread uber-reference
by jettero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |