Posted on 2008-06-27 14:31:03-07 by milpitian
Shouldn't this simple example pass validation?
use Params::Validate; sub foo { validate_pos ( @_, { type => SCALAR }); print $_[0]; } &foo ('hello'); [~] perl valid.pl Parameter #1 ("hello") has a type specification which is not a number. It is a string - SCALAR. Use the constants exported by Params::Validate to declare types. at valid.pl line 5 main::foo('hello') called at valid.pl line 9
Direct Responses: 11247 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.