On Fri, Sep 02, 2005 at 17:56:39 +0200, Ingo Blechschmidt wrote: > Hi, > > multi foo ($a) {...} > multi foo ($a, $b) {...} > > say &foo.arity; > # die? warn and return 0? warn and return undef? return 1|2?
A multi sub is a collection of variants, so it doesn't have arity, each variant has arity. I'd say it 'fail's. To get the arity you must tell it which variant yyou mean, either by providing enough of the prototype, eg &foo(Any).arity vs foo(Any, Any).arity -- () Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker & /\ kung foo master: MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM: neeyah!
pgpmKjxQNOP6e.pgp
Description: PGP signature