mauke / Function-Parameters

Function::Parameters - define functions and methods with parameter lists ("subroutine signatures")
https://metacpan.org/pod/Function::Parameters
18 stars 19 forks source link

Slurpies are assumed to be optional #19

Closed schwern closed 1 year ago

schwern commented 9 years ago

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.

mauke commented 9 years ago

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