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

Hi, I'm a new Perl programmer. It's the first time I go to a forum to ask question. Thanks for any help.

I'm trying to use eclipse to run a test_all.t. Below is the script:

use Test::Harness; my @test_files = ( sort 't/agenda.t', 't/delay_rnd.t', 't/day_of_month.t', ); runtests(@test_files);

Then I got the response from the console:

Insecure dependency in `` while running with -T switch at D:/Perl/site/lib/Test/Harness.pm line 311.

I can run those test file in folder t seperatedly, only this test_all.t is not working.

Thank you for you help.

  • Comment on Insecure dependency in `` while running with -T switch at D:/Perl/site/lib/Test/Harness.pm line 311.
  • Download Code

Replies are listed 'Best First'.
Re: Insecure dependency in `` while running with -T switch at D:/Perl/site/lib/Test/Harness.pm line 311.
by kcott (Archbishop) on Oct 31, 2010 at 03:46 UTC

    The -T switch turns on taint mode. Have a look at perlsec for a discussion of this.

    -- Ken

      Thank you very much Ken. From your reminder, I just brought to mind that one week ago, I turned on the "enable taint mode" in eclipse preference, which in fact I don't know what's the functionality. Now it works. Thank you very much.
Re: Insecure dependency in `` while running with -T switch at D:/Perl/site/lib/Test/Harness.pm line 311.
by locked_user sundialsvc4 (Abbot) on Nov 02, 2010 at 00:37 UTC

    The essential idea behind “taint mode” is that ... “anything and everything that has been provided directly by the user should be presumed to be thoroughly infested with cooties.”

    In other words, such values are “tainted.”   (To put it another way... “suspect.”   “Highly doubtful.”   “Not as trustworthy as a value which the program itself has directly generated.”   “Used goods.”   “The Scarlet Letter.™” “Tainted.”)

    Taint mode is a feature of Perl that attempts to keep track of ... not only the value of a particular variable, but also its tainted-ness.   And to warn you, more-or-less automatically, when you might be using a “tainted” value unwittingly.

    It’s a feature of Perl that is, shall we say, “a very pleasant surprise” (in the right situations).   A little-bit unexpected, perhaps, and therefore probably a surprise ... but tremendously useful once you understand it.