Params-Validate - Shouldn't this simple example pass validation?

Posted on Fri Jun 27 17:31:03 2008 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
Write a response