http://qs321.pair.com?node_id=499986

xdg has asked for the wisdom of the Perl Monks concerning the following question:

In looking at some test files on CPAN recently, I've noticed several with a taint flag in the "shebang" line:

#!/usr/bin/perl -T use Test::More;

For example, this is the default for the pod.t and pod-coverage.t files from Module::Starter::PBP -- though not, apparently, for regular .t files generated that way.

What's the idea behind flagging .t files for taint checking? Any good rules of thumb for when it's the right thing to do? I wouldn't have thought it a necessity for a test script, unless the test was specifically testing the taint-safe behavior of something.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.