On Mon, Mar 09, 2009 at 02:40:43PM -0300, Daniel Ruoso wrote: : Em Dom, 2009-03-08 às 21:31 -0700, Larry Wall escreveu: : > I think the basic rule has to be simply can the signature bind to : > the remaining arguments. If not, we get a warning on unused arguments. : : Just to put here an idea I sent on irc... : : What if Signature.ACCEPTS set $/ with the matched arguments? : : That way we can both know how many arguments the Signature can receive : as well as allow us to use the match as the capture to that call... : : ... $capture ~~ $signature ...; : my $args_matched = @($/).elems; : &code.(|$/);
That API still would not tell the match whether signature must match the entire capture (what you want for normal binding) or can stop part way (what you want for map and friends). Larry