Austin Hastings wrote:
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:
I still mean the same thing: shuck the array and get those args out
here, even the pairs.
The trouble is, an array doesn't contain enough information:
foo( (a=>1), b=>2 );
@args = ( (a=>1), b=>2 );
foo( [EMAIL PROTECTED] );
If we have an arglist ctor, then we could have
@args = arglist( (a=>1), b=>2 );
foo( [EMAIL PROTECTED]);
## (a=>1) but is_positional,
## (b=>2) but is_named,
but without such a constructor, it would be difficult to DWIM correctly.
Of course, for the case of $?ARGS, constructing the array with
appropriate properties wouldn't be a problem.