Newbie question

Jacinta Richardson jarich at perltraining.com.au
Wed Jul 23 02:31:10 CDT 2003


On Wed, 23 Jul 2003, Jacinta Richardson wrote:

> There is a CGI debugger that someone else can probably tell you the name
> of (Scott?).  Alternately, so that you can see what's printed to STDERR
> and your warnings you might want to use CGI::Carp.  This is really easy:

Actually this is rather incorrect.  CGI::Carp will however give you all
the warn(), die(), croak(), confess() and carp() options as regular Carp
does, and let you send whichever ones you want of those to the browser.

> !#/usr/bin/perl -w
> 
> use strict;
> use CGI::Carp qw/fatalsToBrowser/;
> use CGI;
> 
> .....
> 

This in particular will allow you to find out where and why your script is
dying from your browser (it'll also go to the log).

If you want generated warnings to go to your browser add:

use CGI::Carp qw/fatalsToBrowser warningsToBrowser/;

> you can learn more about CGI::Carp by reading:
> 	perldoc CGI::Carp

including all the stuff I just said.

All the best,

	Jacinta

--
   ("`-''-/").___..--''"`-._          |  Jacinta Richardson         |
    `6_ 6  )   `-.  (     ).`-.__.`)  |  Perl Training Australia    |
    (_Y_.)'  ._   )  `._ `. ``-..-'   |      +613 9354 6001         |  
  _..`--'_..-_/  /--'_.' ,'           | contact at perltraining.com.au |
(il),-''  (li),'  ((!.-'              |   www.perltraining.com.au   |




More information about the Melbourne-pm mailing list