This is actually a good reason to use a module like Params::Validate, it helps provide documentation for a subroutine/method.
For example:
sub do_the_thing
{
my %p = validate( @_, { foo => { isa => 'Foo::Big' },
size => { type => SCALAR, default => 10 },
...
} );
...
}
This way all the possible named arguments are documented, as well as their types/classes, defaults, etc. Along with good names, this really does completely document what parameters are accepted, _and_ as a bonus does actual validation on them.
In reply to Re: Re: Documenting Methods/Subs
by autarch
in thread Documenting Methods/Subs
by vek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |