On Jun 17, 2014, at 1:27 PM, Jim Gibson wrote:
> I would split your one, long line into several lines and use a temporary
> variable to hold the possibly undefined value and assigning '' to it if it is
> undefined:
I like that idea. Thanks, Jim.
However, that's going to be a lot of extra work. Does anyone know of a
way to suppress all uninitialized warnings to the log? That way, I wouldn't
have to add extra code throughout the script just to stop those.
CGI::Carp allows you to send 'fatalsToBrowser' but I can't find an
equivalent 'fatalsToLog' or 'justImportantErrorsToLog' feature. Am I missing
it, or is it just not there? Is there another module that allows this? I'd
like to find a replacement for the following, as it allows the code to be added
to the script only once, which makes it easy to use it or comment it out as
desired:
BEGIN {
use CGI::Carp qw(carpout);
open(my $log, '>>', '/usr/local/cgi-logs/mycgi-log') or
die("Unable to open mycgi-log: $!\n");
carpout($log);
}
SurfShop does have an error subroutine, but I like to use the above to
catch things that may not be flagged by the sub.
Thanks again,
Frank
http://www.surfshopcart.com/
Setting up shop has never been easier!
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/