Hi All.
This is a curiosity question, mostly. I have a simple method of sending
debugging messages to the error log:
use constant DEBUG => 1; # Set to 0 to turn off debugging throughout
sub debug ($) {
if (DEBUG) {
return carp sprintf "[%s] [%s] %s", scalar caller, scalar localtime, shift;
}
return 1;
}
which gets called as:
debug("Entering handler");
and in scripts, I get nicely formatted output (I split the lines here):
[BGEP::Utils] [Tue Oct 10 13:24:33 2000] Getting date list at
/usr/local/bin/foo.pl line 22
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
But under mod_perl, I'm getting:
[BGEP::TestPkg] [Tue Oct 10 13:17:00 2000] Sending message to
'[EMAIL PROTECTED]' at /dev/null line 0
^^^^^^^^^^^^^^^^
The thing that's throwing me off is the '/dev/null line 0' part. (This
example is logging the use Mail::Sendmail.)
Any ideas as to why this is being reported like this? It is being called
from with a handler, not from /dev/null. :)
Environment:
Linux 2.2.17 (i686)
Perl 5.6.0
Apache 1.3.12/mod_perl 1.24
(All built from scratch.)
(darren)
--
To do nothing is to be nothing.