The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Taint::Util - Test for and flip the taint flag without regex matches or eval

SYNOPSIS

    use Taint::Util;

    my $sv = "pis";

    # $sv now tainted under taint mode
    taint $sv;

    # Untaint $sv again
    untaint $sv if tainted $sv;

DESCRIPTION

Wraps perl's internal routines for checking and setting the taint flag and thus does not rely on regular expressions for untainting or odd tricks involving eval and kill for checking whether data is tainted, instead it checks and flips a flag on the scalar in-place.

Provides three functions, tainted which returns a boolean indicating whether a given variable is tainted and taint and untaint which always return false and are no-ops if tainting is disabled.

EXPORTS

Exports tainted, taint and untaint by default. Individual functions can be exported by specifying them in the use list, to export none use ().

AUTHOR

Ævar Arnfjörð Bjarmason <avar@cpan.org>

LICENSE

Copyright 2007 Ævar Arnfjörð Bjarmason.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.