++ed by:

2 PAUSE users
1 non-PAUSE user.

Christian Jaeger
and 1 contributors


FP::Untainted - functional untainting


 use FP::Untainted;
 exec untainted($ENV{CMD}); # doesn't change the taint flag on $ENV{CMD}

 use FP::Untainted qw(untainted_with);
 exec untainted_with($ENV{CMD}, qr/^\w+$/s); # dito
 # NOTE that the ^ and $ anchors are essential if you want to make
 # sure the whole string matches!

 # or, (but this doesn't force the /s flag)
 exec untainted_with($ENV{CMD}, '^\w+$');

 use FP::Untainted qw(is_untainted);
 # complement of Scalar::Util's 'tainted'


Taint::Util offers `untaint`, but it changes its argument. This module provides a pure function to do the same (it (currently) uses a regex match instead of XS to do so, though.)

Should this module stay? Vote your opinion if you like.