> > Don't forget though that defaults come from expressions, not mere > values. > > sub f($x, $y = lc($x), $z = substr($y, 0, 5)) { ... } > > Here, it would be easy to say that: > > * min arity is 1 > * max arity is 3 > * parameter names are qw( $x $y $z ) > > but there isn't a simple representation for the defaults. > > you can provide it as a list of parameter descriptions, in this case [ { name => 'x', sigil => '$', positional => true, required => true, }, { name => 'y', sigil => '$', positional => true, required => false, default => true, }, { name => 'z', sigil => '$', positional => true, required => false, default => true, } ] in case of slurpy argument: sigil => '@' or sigil => '%' Best regards, BranoThread Previous | Thread Next