On Mon, Mar 07, 2005 at 05:36:08PM +0100, Aldo Calpini wrote:
: but then, you could define:
: 
:     multi sub bar($x, $y, $z) { ... }
:     multi sub bar(@coords is shape(3)) {
:         my($x, $y, $z) = @coords;
:         return bar($x, $y, $z);
:     }
: 
:     bar(@coords); # ok now

Or, assuming you might want to generalize to N dimensions someday, just

    sub bar ([EMAIL PROTECTED]) {...}

and deal with it as in Perl 5 as a variadic list.  I suppose one could say

    sub bar ([EMAIL PROTECTED] is shape(3)) {...}

and get checking on the argument count.

Larry

Reply via email to