>>>>> "Dave" == Dave Rolsky <[EMAIL PROTECTED]> writes:
Dave> On Thu, 7 Dec 2000, martin langhoff wrote:
>> I wonder how do those hardcore guys that develop using handlers
>> debug. Mhhh. They must write 'perlfect' code, I guess, and/or
>> understand those cryptic debuggers ...
Dave> I just do a lot of debugging via warn statements and looking
Dave> at the error logs.
My BEGIN block looks like this. I realize IO is rather bulky, but I
like it and the environment I'm in isn't *that* busy where it makes a
significant impact.
BEGIN {
# Wash the PATH.
$ENV{'PATH'} = '/opt/gnu/bin:/usr/local/bin:/usr/bin';
$ENV{'CDPATH'} = '';
$ENV{'ENV'} = '';
use IO::File;
use CGI::Carp qw(carpout fatalsToBrowser carp);
use Savvy::Conf qw(:WWWBasic);
my $log = 1;
my $logfile = "/www/cgi-logs/cgi-log";
if ($log) {
my $LOG = IO::File->new(">> $logfile") or
Savvy::Conf::cab("Unable to open $logfile for writing: $!\n");
# Dupe STDERR. Original is SAVEERR.
carpout($LOG);
}
}
Then I 'tail -f' the $logfile, the Apache server error_log, and watch
watever comes to the broswer due to the fatalsToBrowser. Works well for
me.
The '$r->log_reason' finds a home in my code as well.
Plus, I *always* use '-w' and '-T' and get them cleanly working during
development phases, although I shut them off for actual deployment.
Peace.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]