in reply to Correct idiom for default parameters
It has been said before that this code is "too simple" for CPAN, but I must disagree. I have seen people write this kind of code over and over again and they always get it wrong. Perhaps now they will spend more time getting the rest of their code right...-- Leon Brocard in the notes of Data::Page
All the errors, mistakes, and cryptic golfing in this thread, along with the fact that you will need to do this more than once imply you need a modular, re-usable solution.
The software engineering approach is to use Params::Validate or a newer related module.
-- Terence Parr, "Enforcing Strict Model View Separation in Template Engines"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DWIM code would use Params::Validate (overengineered)
by Corion (Patriarch) on Apr 29, 2010 at 17:29 UTC | |
by metaperl (Curate) on Apr 30, 2010 at 13:40 UTC | |
by Corion (Patriarch) on Apr 30, 2010 at 13:55 UTC | |
|
Re: DWIM code would use Params::Validate
by BrowserUk (Patriarch) on Apr 29, 2010 at 18:42 UTC | |
by Anonymous Monk on Apr 30, 2010 at 09:46 UTC | |
by BrowserUk (Patriarch) on Apr 30, 2010 at 12:54 UTC | |
|