Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Error reporting in CGI
- daniel kaplan
May 20, 2005, 1:41 am
rate this thread
Still new to Perl so this might be a dumb question. The error reporting
when a script has errors is different when I run it in Perl from a command
prompt, or from Perl in a browser (off of my Linux server).
So where as in the command prompt off of my machine I'll get this:
[..time stamp...] myscript.pl: Global symbol "$x" requires explicit
packagename at pix.pl line 64.
When I run the same script (via browser) I get:
[..time stamp...] [error] [client --IP ADDRESS--] Premature end of script
is there anything i can do withint the CGI module to make the first appear
in either the errorlog or in the browser?
not even sure this is solvable by module, but figured i could ask....
Re: Error reporting in CGI
Thanks Sherm, I have that in all my scripts, thinking that was the ticket.
But since it didn't do it upon furhter reading I realized it works with "the
standard warn(), die (), croak(), confess() and carp() calls will
automagically be replaced with functions that write out nicely time-stamped
messages to the HTTP server error log."
Actually now that I think about it, not declaring $x before using it woudl
be a compile time error (with my minimal knowledge of Perl) and am asking
this in the wrong newsgroup?
- » Net::SMTP error: Can't locate Mail/Sender.pm in @INC
- — Previous thread in » PERL Modules Announcements