NAME

Taint - Perl extension to taint variables

SYNOPSIS

use Taint;
taint($taintvar[, $anothervar[, $yetmorevars]]);
$bool = tainted($vartocheck);

DESCRIPTION

taint() marks its arguments as tainted. If a hard reference is passed, it's dereferenced (recursively if necessary) and the refered-to thing is tainted.

tainted() returns true if its argument is tainted, false otherwise

DIAGNOSTICS

Attempt to taint read-only value

You attempted to taint something untaintable, such as a constant or expression. taint() only takes lvalues for arguments

Taint reference recursion detected

A reference loop was detected. taint(), if passed a reference, will dereference it and try tainting that. If the dereferenced value is a reference, then it in turn is dereferenced and we try again. We keep track of all the references we see, though, and complain if we see the same reference twice. Otherwise this:

$bar = \$baz;
$baz = \$bar;
taint($bar);

will loop forever, or at least until all your memory was eaten up by the recursive data structures.

Attempt to taint an array

A reference to an array was passed to taint. You can only taint individual array items, not array itself.

Attempt to taint a hash

A reference to a hash was passed to taint. You can only taint individual hash items, not the entire hash.

Attempt to taint code

You passed a coderef to taint. You can't do that.

Attempt to taint a typeglob

You passed a typeglob to taint. taint only taints scalars, and a typeglob isn't one.

Attempt to taint a reference

This is an error you shouldn't ever get, and it indicates a problem with the Taint module somewhere. Regardless, it means that taint tried tainting a hard reference, which won't work.

Attempt to taint something unknown or undef

You tried tainting either a variable set to undef, or your version of perl has more types of variables than mine did when this module was written. Odds are, you're trying to taint a variable with an undef value like, for example, one that has been created (either explicitly or implicitly) but not had a value assigned.

Doing this:

my $foo;
taint($foo);

will trigger this error.

AUTHOR

Dan Sugalski <sugalskd@osshe.edu>

SEE ALSO

perl(1).