Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Difference between warnings pragma or enabling warnings using -w switch?

by rupesh (Hermit)
on Aug 30, 2005 at 05:16 UTC ( #487644=note: print w/replies, xml ) Need Help??


in reply to Difference between warnings pragma or enabling warnings using -w switch?


gube,

The -T command line switch turns on taint checking, something that's useful for CGIs when you want to make sure there's no user input that can possibly flow through to the operating system for security reasons. Typically you want to enable taint-checking as early in the command line options as possible.

-w enables warnings globally for the perl interpreter. It can be used for code that needs to maintain compatability with 5.005 and older perls, but for newer code, use warnings is better, because it will not enable warnings in parts of the program that are not designed to be run with them enabled.

The -w has a global effect on your entire program. The warnings pragma was introduced in Perl 5.6 and allows for scoped sections of warning-enabled code, with the ability to turn on and off specific classes of warning messages.
On more information on use warnings, you can visit this node --> here.

Cheers,
Rupesh.
  • Comment on Re: Difference between warnings pragma or enabling warnings using -w switch?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://487644]
help
Chatterbox?
[marioroy]: I use the default and happens to be bash
[erix]: heh, I like the "Resolved" (Christiansen is really funny)
Discipulus is makita a reincarnation of grinder?
[erix]: I probably also need to understand TAP a bit better than I do
[Corion]: Discipulus: Hahaha ;)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2017-03-23 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (285 votes). Check out past polls.