Function-Parameters icon indicating copy to clipboard operation
Function-Parameters copied to clipboard

Slurpies are assumed to be optional

Open schwern opened this issue 10 years ago • 1 comments

Method::Signatures supports required slurpies.

$ perl -MMethod::Signatures -wle 'method foo (@foo!) {} main->foo'
In call to main::foo(), missing required argument @foo at -e line 1.

The idea that slurpies are always optional is baked pretty deep into Function::Parameters and I'm having difficulty enforcing the requirement.

schwern avatar Feb 23 '15 00:02 schwern

See #17. It's not that they're optional, it's that they consume a list and lists can be empty.

mauke avatar Feb 23 '15 07:02 mauke