[thelist] Re: CGI Help as a <tip>
Martin Burns
martin at easyweb.co.uk
Tue Jun 18 03:32:01 CDT 2002
This is too good not to capture as tips
On Tuesday, June 18, 2002, at 12:27 am, Means, Eric D wrote:
<tip author="eric.d.means at boeing.com" type="CGI">
Add the line
use CGI::Carp 'fatalsToBrowser'
to the top (though *after* the #!/usr/bin/perl line) of Perl CGI scripts.
This will catch any errors and display them in friendly fashion to the
browser instead of just spitting out a generic "500 Server Error"
message.
</tip>
<tip author="kalos at carolina.rr.com" type="CGI">
[It's] always helpful to "use CGI::Carp 'fatalsToBrowser';" (minus the
double
quotes).
It will spit out a far more friendly error than trolling through the
error log will.
</tip>
<tip author="kalos at carolina.rr.com" type="CGI">
CGI-Carp is a perl module available from CPAN and will help greatly when
debugging your scripts.
As you get deeper into using perl you'll find that modules are a life
saver
for many things (as they save a great deal of time).
</tip>
Cheers
Martin
_______________________________________________
email: martin at easyweb.co.uk PGP ID: 0xA835CCCB
martin at members.evolt.org snailmail: 30 Shandon Place
tel: +44 (0)774 063 9985 Edinburgh,
url: http://www.easyweb.co.uk Scotland
More information about the thelist
mailing list