I want something that verifies incoming parameters (usually a hash ref, so sub-keys) are correct, and also is designed in such a way that a short blurb can be added for viewing/extracting that describes the inputs.
It seems an obvious conjoining, if you are verifying inputs why not also document them, or vice versa. I may end up using something like Smart::Comments/Getopt::Euclid as a starting point for something of my own.
- Ant
- Some of my
best work - (1 2 3)
| [reply] |
These subs... are they intended to be called as functions, or as methods? If the latter, then something like Method::Signatures, or MooseX::Declare might be an idea.
| [reply] |
Methods AND subs, this is something I want to start applying to existing code, so switching to Moose is probably beyond scope.
- Ant
- Some of my
best work - (1 2 3)
| [reply] |
something like Method::Signatures, or MooseX::Declare might be an idea.
You mean "a terrible idea," right? Whether they're "functions" or "methods" (i.e. "functions where the type of the first argument determines the function to be called"), verifying input and output is the same.
| [reply] |