Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
226
Posts in
93
Topics by
469
Members - Latest Member:
suryamj
September 08, 2010, 04:34:40 AM
DTP-AUS Forums INDEX
|
PERL: CGI programs
|
Fixes & Warnings
|
Other perl programs: debug perl errors , server logs, and problem email output.
0 Members and 1 Guest are viewing this topic.
« previous
next »
Pages:
[
1
]
Author
Topic: Other perl programs: debug perl errors , server logs, and problem email output. (Read 10589 times)
Boss
Administrator
Hero Member
Offline
Gender:
Posts: 133
'Wombat'
Other perl programs: debug perl errors , server logs, and problem email output.
«
on:
September 11, 2005, 08:13:14 PM »
1)
Not always a good idea to advertize this as it can be abused by the inexperienced, but if one adds...
use CGI::Carp qw/fatalsToBrowser/;
...just below the first (shebag) line of the primary called script one can often get slightly more meaningful errors displayed.
JUST MAKE SURE Same is commented out
(# char at start of line) OR BETTER delete the line
once all is happening OK
(else you can, if summink else goes a-up, give away all sorts of useful info to those who should not have such info!!!)
.
2)
Old fashioned Perl purists
(before #...heads got to use the net)
would not agree 'cause they think all error output is useful (OK if you are the programmer and on your own non shared box!), but...
IF you have a program that keeps filling up the logs with non-critical error/warning notices using up valuable disk space, then add....
$^W=0;
...just below the top first line also only leave and don't remove as other debug line above. That should? stop all those mostly harmless Perl generated errors the programmer did not correct - also helps with the rare few hosts that demand the "-w" switch on the Perl shebang line too; but don't tell 'em.
3)
If have a perl program and you experience problems with email output (i.e. none getting through) AND your scripts are not using perl modules to create emails (quite common) then....
where/if your prob program uses code similar to....
open (MAIL, "|/full/path/to/sendmail -t")
...then temp replace as...
# ....open (MAIL, "|/full/path/to/sendmail -t")....
....open (MAIL,">>EMAILTEXT.TXT")....
and output should be deposited in a file named EMAILTEXT.TXT so you can check that there is output being generated.
Later remove the new line and the # character to free up the original line.
with some progs that use a perl module for email output, you can often find the point where the modulke::class is called and add before or after (temporarily)....
open (MAIL,">>EMAILTEXT.TXT"); print MAIL "$createdemailstring\n"; close(MAIL);
Logged
'imself
; Ron Woolley [
alias
Wombat
]
Melbourne Australia [PHParagon]
My programs never have bugs. However they may occasionally contain FREE 'random extended features'.
Pages:
[
1
]
Jump to:
Please select a destination:
-----------------------------
PERL: CGI programs
-----------------------------
=> Updates & News
=> Fixes & Warnings
-----------------------------
HTML Code & Page Design
-----------------------------
=> HTML General
-----------------------------
DeskTop Publishing & Prepress
-----------------------------
=> DTP & Prepress General
Powered by SMF 1.1.11
|
SMF © 2006-2009, Simple Machines LLC
Helios Multi
design by
Bloc