Debugging a CGI Script

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: George Toft
Date:  
Subject: Debugging a CGI Script
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 -
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss