We don't bite newbies here... much | |
PerlMonks |
Re: DWIM code would use Params::Validateby BrowserUk (Patriarch) |
on Apr 29, 2010 at 18:42 UTC ( [id://837615]=note: print w/replies, xml ) | Need Help?? |
Here's one reason not to use Params::Validate. The code (minus the inline stuff), in Re: Inline Subs Revisited takes just over 4 1/2 minutes to run. Modify those subs to validate their parameters using P:V like so:
And it takes almost 22 minutes. And achieves nothing that couldn't be done with die unless ref( $list ) eq 'ARRAY';. (That costs nothing measurable.) Its like trying get better fuel economy by adding a large, copper-wound electric motor and 50Kg of batteries to your car. Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|