in reply to The -w switch on a web application

Personally, I tend to code with -w when I'm developing and testing an application. Once that's done, I rarely leave the warnings turned on when the code is released to production.

I understand that the warnings can be useful to have for debugging reasons if (when) things go wrong, especially to pick up run-time errors. I do think, though, that that small(ish) bonus is soon cancelled out when you consider the chore of digging through logs, especially with a large, oft-used application (like a website).

As long as you're aware of why the warning is appearing at design-time, it seems fairly pointless to keep having that warning appear, and get logged, in production.

I see warnings as a very useful debugging tool, rather than something to directly test the correctness of my code - after all, that's what use strict and the compiler are for *grins*. Warnings at best, in my mind, drop hints as to why things are going wrong, not what is wrong.

-- Foxcub
A friend is someone who can see straight through you, yet still enjoy the view. (Anon)

Replies are listed 'Best First'.
Re: Re: The -w switch on a web application
by spike_hodge (Novice) on Jan 31, 2003 at 12:43 UTC
    Testing with defined is much the same as deleting the -w. The var is still not defined; you are just living with it. Is it possible that a cgi using the -w and working fine may fall over at a later date if prel or a module that is used is upgraded or altered in some way?