in reply to Re: warnings and strict -- The 2 Best Ways You Can Improve Your Programming
in thread warnings and strict -- The 2 Best Ways You Can Improve Your Programming

Many people still use -w and for good reason. Some people like turning on warnings globally. Yes, it can be a good thing if you want that behavior. I am tired of people bashing it.

Many big corporations with home-grown Perl modules still use the -w flag and wouldn't want it any other way.

  • Comment on Re^2: warnings and strict -- The 2 Best Ways You Can Improve Your Programming

Replies are listed 'Best First'.
Re^3: warnings and strict -- The 2 Best Ways You Can Improve Your Programming
by demerphq (Chancellor) on Oct 05, 2005 at 12:36 UTC

    Many people still use -w and for good reason. Some people like turning on warnings globally. Yes, it can be a good thing if you want that behavior. I am tired of people bashing it.

    Well then I doubt you'll like to hear this: It doesnt actually work as you say it works. -w doesn't turn on warnings everywhere. It turns on warnings everywhere UNLESS a module or code uses lexical warnings. So if the module has "no warnings" then thats what happens.

    Maybe you meant -W?

    ---
    $world=~s/war/peace/g

Re^3: warnings and strict -- The 2 Best Ways You Can Improve Your Programming
by itub (Priest) on Oct 05, 2005 at 18:24 UTC
    I agree that -w is still useful if that's what you really want and you are willing to accept the consequences. However, I've seen that in many, many cases, it is used out of ancient habit even when it's not the most appropriate. Using it together with warnings shows some of this confusion: if you want global warnings you just need -w, and if you want lexical warnings you just need warnings. If you use both, it's because you don't know what you want, or you don't understand the difference.

    (Note, here "you" is used as a generic pronoun, not refering to any specific person).