Re:A little thing to love about Perl 6 and COBOL
by eCa on Wednesday February 04, 2015 @08:58PM
(#9001333)
There is also Kavorka[1] as an alternative to Function::Parameters, which can use Type::Tiny types in signatures. The next step after that is Moops[2]...
The validation is unfortunately at runtime, but at least you get a clear error instead of unanticipated behavior. Moo (and it's bigger parent, Moose) can really help you structure your application better using roles.
https://metacpan.org/pod/Moo https://metacpan.org/pod/Type::Tiny
Edit: Don't use Params::Validate; kbenson's recommendation for Function::Parameters looks awesome!