#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    4
    Rep Power
    0

    910926 - what's the difference between -T and -t?


    in the first line of perl script, i see:
    #!/usr/bin/perl -wT
    i think if i use -wT instead of -wt, it may cause the script to stop at a specified line which taint mode is checked. while if i use -wt just a warning is generated and execution of the perl script is not stopped.
    am i right?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Location
    Paris area, France
    Posts
    843
    Rep Power
    496
    Yes, that is more or less the basic idea. From the Perlrun manpage documentation:

    -t

    Like -T, but taint checks will issue warnings rather than fatal errors. These warnings can now be controlled normally with 'no warnings qw(taint)'.

    Note: This is not a substitute for -T ! This is meant to be used only as a temporary development aid while securing legacy code: for real production code and for new secure code written from scratch, always use the real -T.
    See http://perldoc.perl.org/perlrun.html for more details.

    BTW, the -w option should no longer be used for new code, use the 'use warnings' pragma instead.

IMN logo majestic logo threadwatch logo seochat tools logo