Subject: | Use of uninitialized value in string eq at Sys/Syslog.pm line 631. |
Hi. This is imacat from Taiwan. I have just upgraded to Sys:Syslog
0.18, and got flooded with errors from my cron scripts that use
Sys::Syslog. They all says:
Use of uninitialized value in string eq at
/usr/lib/perl5/5.8.8/i686-linux-thread-multi-64int-ld/Sys/Syslog.pm line
631.
After some tests, I found that if the script openlog() and closelog()
without any logging, $current_proto will be undef and hence caused this.
The demostrative terminal log is below.
imacat@leaf ~ % cat /tmp/sys-syslog-test
#! /usr/bin/perl -w
use Sys::Syslog;
openlog("sys-syslog-test", "", LOG_USER);
closelog();
imacat@leaf ~ % /tmp/sys-syslog-test
Use of uninitialized value in string eq at
/usr/lib/perl5/5.8.8/i686-linux-thread-multi-64int-ld/Sys/Syslog.pm line
631.
imacat@leaf ~ %
I have attached a simple patch. Hope that this helps. Please tell me
if I can be of any help, or if there is any question. Thank you.
Subject: | Sys-Syslog-0.18-protoundef.diff.asc |
Message body not shown because it is not plain text.