package CGI::Taint; use Filter::Handle 'subs'; use Taint; BEGIN { Filter \*STDOUT, sub { # Access $_[0] directly so that tainted() can test # the actual variable. if ( tainted( $_[0] ) ) { die "Tainted output could not be written to STDOUT: $_[0]"; } $_[0] } }