in reply to Re: A CGI whiteboard in Perl
in thread A CGI whiteboard in Perl

use strict; #following three are for debugging--turn off for production. #(first two can clog up the web log; last isn't of as much consequence + if left uncommented) #use warnings;

Usually, if you're going to use "strict" and "warnings" then you'd put them right at the top of the file so that that they cover as much of your code as possible.

And if you're commenting out 'use warnings' because it "can clog up the web log", then I'd be concerned that there are still some potential problems in your code. It should be possible to get code to run constantly without filling your web log with warnings. You should run with 'use warnings' turned on and track down and fix all of the warnings that you get.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^3: A CGI whiteboard in Perl
by OfficeLinebacker (Chaplain) on Oct 06, 2006 at 16:23 UTC
    Hi.

    I must admit, I do have the options on as a default, but just turned them off because I am upgrading the app. You're right, if anything they should be ON for regular production, and for debugging at the command line. OFF when I am doing lots of changing and testing via the web interface. I'll change the comments to suit.

    I will also put the strict pragma first.

    Thanks,
    T.

    _________________________________________________________________________________

    I like computer programming because it's like Legos for the mind.

      OFF when I am doing lots of changing and testing via the web interface. Wouldn't it make more sense for testing if it was ON? You know . . . to see if you get warnings?