#!/usr/bin/perl -wT # test3.pl use CGI; use Test::Simple tests => 11; use Scalar::Util qw(tainted); use lib qw(...........); # set this as appropriate. use CGI::Taintless; my $q = CGI->new(); my $c = CGI::Taintless->new($q, {blah=>'^([helo]+)$'}); pr($c->header()); pr($c->start_html()); pr("print world"); pr($c->param()); pr($c->param("blah")); pr($c->hidden(-name=>"blah")); pr($c->start_form()); pr($c->self_url()); pr($c->submit()); pr($c->end_form()); pr($c->end_html()); sub pr { my @thingy = shift; foreach my $t (@thingy) { ok(!tainted($t), $t); } }