Miroslav Silovic wrote:

> [EMAIL PROTECTED] wrote:
>
>> * expands its RHS and evaluate it as if it was written literally.
>>
>> I'd like @_ or @?ARGS or something like that to be a *-able array that
>> will be guaranteed to be compatible with the current sub's signature.
>>
> This sounds nice, though. Maybe it suggests that the 'named splat'
> should be something other than *?


How about "perl should DWIM"? In this case, I'm with Juerd: splat should
pretend that my array is a series of args.

So if I say:

foo [EMAIL PROTECTED];

or if I say:

foo([EMAIL PROTECTED]);

I still mean the same thing: shuck the array and get those args out
here, even the pairs.

It's worth pointing out that perl does know the list of declared named
args, though that may not be enough. If the pair.key matches an expected
arg, then splat should collapse it for sure. If it doesn't match...I dunno.

Is there a list() operator for converting hashes into lists of pairs?
That might make parsing foo([EMAIL PROTECTED], *%_) more palatable, but I'd 
still
prefer to get pairs in @_ if I don't explicitly ask for *%_...

=Austin

Reply via email to