Help for this page

Select Code to Download


  1. or download this
    use Params::Validate qw(:all);
    use Test::More;
    ...
    ok(howareyoufeelingtoday(q{sad}),    q{sad});
    ok(howareyoufeelingtoday(q{mental}), q{mental});
    ok(howareyoufeelingtoday(q{unhappy}),  q{unhappy}); # Should not pass
    
  2. or download this
    $ perl pv.pl
    1..4
    ...
    ok 2 - sad
    ok 3 - mental
    ok 4 - unhappy
    
  3. or download this
    diff --git a/lib/Params/Validate.xs b/lib/Params/Validate.xs
    index 396a369..3f3f0f4 100644
    ...
         if ((temp = hv_fetch(spec, "untaint", 7, 0))) {
             if (SvTRUE(*temp)) {
                 *untaint = 1;