![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Even if you are aware, maybe it is good to remember: "Don't use prototypes". Except in a very small number of cases of restricted utility (like ($$) prototyped functions used with sort), they don't do what you want (unless you're very weirdo to match the craziness of Perl prototype semantics). One example:
And don't take my words. Tom Christiansen said that a long time ago and Damian Conway said more about it in "Perl Best Practices". That said, maybe you may get the behavior you want with a module like Params::Validate. See the docs with a special attention to the section on "Callback Validation": In reply to Re: prototypes: so many \@'s?
by ferreira
|
|