> Is there any easier way of debugging Perl scripts? Modifying the
> script and putting a few print statements is a bit of a pain..
> espcially when the server is a remote server and slow..

If lag is biting, do your development on a local machine. :]

For debugging CGIs, quite often they'll dump useful information to stderr
that you won't see, it can be helpful to leave a 'tail -f' going on
error_log (if you're running Apache) in the background while you work.

If you're adding lots of output, quite often this will break the cgi even
further when it's run normally, I normally do it to stderr (so it goes to
the log instead of screen or browser):

my $debug = 1; # change to 0 once you're done
printf STDERR "[%s] %s - some useful information\n", 
  $0, scalar localtime if $debug;

-- adm


--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to