dslinux/user/perl/lib/Text/ParseWords taint.t

cayenne dslinux_cayenne at user.in-berlin.de
Mon Dec 4 18:01:12 CET 2006


Update of /cvsroot/dslinux/dslinux/user/perl/lib/Text/ParseWords
In directory antilope:/tmp/cvs-serv17422/lib/Text/ParseWords

Added Files:
	taint.t 
Log Message:
Adding fresh perl source to HEAD to branch from

--- NEW FILE: taint.t ---
#!./perl -Tw
# [perl #33173] shellwords.pl and tainting

BEGIN {
    chdir 't' if -d 't';
    @INC = '../lib';
    require Config;
    if ($Config::Config{extensions} !~ /\bList\/Util\b/) {
	print "1..0 # Skip: Scalar::Util was not built\n";
	exit 0;
    }
}

use Text::ParseWords qw(shellwords old_shellwords);
use Scalar::Util qw(tainted);

print "1..2\n";

print "not " if grep { not tainted($_) } shellwords("$0$^X");
print "ok 1\n";

print "not " if grep { not tainted($_) } old_shellwords("$0$^X");
print "ok 2\n";




More information about the dslinux-commit mailing list