Just another Perl shrine | |
PerlMonks |
Re: Dependencies, or, How Common is Regexp::Common?by legLess (Hermit) |
on Sep 17, 2003 at 07:02 UTC ( [id://292069]=note: print w/replies, xml ) | Need Help?? |
The error is in your assumption of how the code is used. The routine I gave doesn't do any validation at all, it just returns a quoted regex which is used elsewhere in the code to properly untaint incoming data:
Just for the heck of it I added another test, passing a parameter called 'bart' with a value of 'foo123abc'. I defined 'bart' as an integer and watched this test pass:
Thanks for the reply, though. UPDATE: I should note that one of the simplifications I made (not expecting the Spanish Inquisition, as they say) to the code in my original post was changing this line in the module:
to:
In the module, &valex serves a dual purpose which I didn't think pertinent to the question I was asking.
In Section
Seekers of Perl Wisdom
|
|