Debugging a CGI Script

George Toft plug-discuss@lists.plug.phoenix.az.us
Fri, 10 May 2002 17:28:30 -0400


It's coming back to me now: -w is "strict" so you use it to
develop with, then remove it (as the code "works properly") so
it is not needed.

George


Victor Odhner wrote:
> 
> I had writtten this:
> > Debugging at the command line allows you to use
> > the -w option (which you should NOT use in a
> > production CGI), ...
> 
> Tony Wasson wrote:
> > I always thought you *test* with -w and get everything
> > coded right and then run without it.
> 
> You're right, Tony, I think we're saying the same thing.
> 
> Basically most of what -w will do for you is going to
> happen any time you activate the script, and it will
> spew messages for bad syntax or bad practice which
> you should eliminate.
> 
> But there seem to be some cases where -w will give you
> a message based on the program's execution flow -- for
> example maybe if you should referenced an undefined
> variable in an evaluated statement?
> 
> That's why, when you install a CGI for production,
> you don't want -w in its #! line, because it might
> pop up with some new warning message that will cause
> the resulting page to have bad syntax, so all the
> user sees is a server error message.  And of course
> these may be hard to diagnose, depending on how
> much gets into the server's error log.
> 
> Vic
> http://members.cox.net/vodhner/
> Helping Grow the Techoasis - http://www.techoasis.org
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
> 
> PLUG-discuss mailing list  -  PLUG-discuss@lists.plug.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss