krkeegan/misterhouse — pull request #30 by gac410 (2014-09-21 02:14:42+00:00)
Title: Table a validation

@krkeegan, Here is my latest validation code. I've dumped the MASK code and replaced it with a regular expression. Also simplified the array by just passing in the minimum parameter count rather than a required/optional parameter on each element.

Probably the only funky part is identifying the regex by testing ref($field) eq 'Regex'. I've tested on perl 5.8.8, 5.16.3 and 5.20.0 and it works in all 3 versions. However http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators has a note about possible changes in this area.