in reply to A Refactoring We Will Go
For example, if I accept a date range in 'blort' above ($conf{'template'}->{'blort'}) of the format YYYY-MM-DD, and the value supplied by the template's value in that key is DD-MM-YYYY, I would like to die with an error specific to that key, and then return a list of the proper syntax, such as:
"Date format incorrect, please supply the date in the format YYYY-MM-DD for proper parsing."
How would I go about doing that? I see that in Params::Check, I can run another sub inside the accept() object to pass the args, and validate that way, but now I'm back to doing ~40 different calls to that check, which is back to where I started.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A Refactoring We Will Go (patch)
by tye (Sage) on Jul 01, 2003 at 15:36 UTC |