NAME

FP::Untainted - functional untainting

SYNOPSIS

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'

DESCRIPTION

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.

NOTE

This is alpha software! Read the package README.