Cool, didn't know that Perl supported function prototyping. Looks a bit quicker and dirtier than using Params::Check - fewer filtering options, no default values, etc.
I am gravitating towards creating a separate file which would contain all of my function prototypes and then I would require that in my module. My module has quite a few functions so this might be the easiest way to keep track of them all and have a single point of change rather than having to track down all that template-building legwork within the subroutines themselves that Params::Check requires.
Not quite as legible, though. And to heed the docs warning, I could get into trouble writing prototypes for already written functions. So I'll have to do a little checking to make sure I'm not doing anything too silly with how arguments are being passed and unpacked.
Anyway, thanks for pointing this out protist =)
Strange things are afoot at the Circle-K.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||