News for hackers. Stuff that matters.
Re:A little thing to love about Perl 6 and COBOL by muraiki on Wednesday February 04, 2015 @07:58PM (#9001130)
If you planned on using objects, you can consider using Moo for roles to allow composition, and combining it with Types::Tiny for type validation. There's also Params::Validate for plain functions.

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!

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]...

[1] https://metacpan.org/pod/Kavorka

[2] https://metacpan.org/pod/Moops