Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Config::Validate: problem with a key typeby Hue-Bond (Priest) |
on Mar 22, 2010 at 16:25 UTC ( [id://830111]=perlquestion: print w/replies, xml ) | Need Help?? |
Hue-Bond has asked for the wisdom of the Perl Monks concerning the following question: Esteemed monks, I'm reading a configuration file using Config::General and validating it via Config::Validate. The goal is to reject the configuration and die if there are any errors in it. One of the requirements I want to impose is that some configuration keys shouldn't be repeated. When I repeat a key, Config::General creates an array to hold all the given values. I expect Config::Validate to reject that array (since it's not a plain string) but that's not happening. Funnily, if I tell Config::Validate that I want an integer instead of a string, it does die as desired. Here is some code to show the problem:
How do I reject such a configuration? Update: I just reported this bug. --
Back to
Seekers of Perl Wisdom
|
|