One approach would be to build an array @col_validators in which each element of the array holds a reference to the validation function for the corresponding column of the data record; e.g., from the example you have given in your question, element 1 of the array holds a reference to the is_int() integer data validation function.
This array would be built when the configuration file is parsed: as each config statement is parsed, the array is checked to see that a validation function has not been assigned to that column already, that the validation function exists, etc.; the function reference specified in the config statement is then assigned to the specified array element.
After the array is built, it should be checked to see that no empty slots exist or that any empty slots are filled with a reference to a null or error-reporting function.
When the array is used, it only remains the check that a column parsed from a record corresponds to an existing element in the validation array (if it does not, the record itself may be invalid), and you're done.
BTW -- Since your updated question is differs significantly from the original, a re-post seems warranted.
In reply to Re: Invoke sub whose name is value of scalar
by Anonymous Monk
in thread Invoke sub whose name is value of scalar
by andreas1234567
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |