in reply to Re: Subroutines within if statements
in thread Subroutines within if statements

...until you know why you might not want strict and warnings.
Why might I not want strict and warnings?

I get twitchy seeing no warnings in a small block. When I see either commented out at the top of a script I hide behind the sofa. :-)

What is it I don't know yet? Is there a secret handshake? :-)

Replies are listed 'Best First'.
Re^3: Subroutines within if statements
by kyle (Abbot) on Feb 22, 2008 at 13:55 UTC

    Why might I not want strict and warnings?

    I haven't written any significant code without them since I learned of them. (I write perl -e without them.) I don't have a case where I wouldn't want them.

    That said, I could imagine code that produces spurious warnings. I could further imagine some PHB who wants no error messages in a log somewhere.

    I've heard some say they turn off strict and warnings in production to avoid some overhead. I personally think this is a lousy way to gain performance.

    Like you, I don't like to see code without strict and warnings. I don't want to work on it. Nevertheless, other programmers have their own minds, and I want to respect that.