[Mimedefang] mimedefang.pl spilling "Use of inherited AUTOLOAD for non-method" errors
Jan-Pieter Cornet
johnpc at xs4all.net
Sat Feb 12 19:51:15 EST 2011
On 2011 Feb 12, at 23:31 , kd6lvw at yahoo.com wrote:
> --- On Sat, 2/12/11, Kenneth Porter <shiva at sewingwitch.com> wrote:
>> PM -0800 kd6lvw at yahoo.com wrote:
>>> Try updating your Perl interpreter. 5.8.8 is years out of date.
>>> 5.12.3 is the current release.
>>
>> 5.8.8 is the version available for the widely-deployed RHEL5....
>
> And that is your problem. Upgrade it from source.
That won't help. The bug isn't in perl, it's in Unix::Syslog. perl5.12 will give the same error.
It is likely caused by the fact that the OP's syslog.h is missing a couple of constants, that are mentioned in the original errors:
> Feb 11 06:46:31 marlin mimedefang-multiplexor[1229]: [ID 980602 mail.info] Slave 3 stderr: Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_AUTHPRIV() is deprecated at (eval 103) line 1.
> Feb 11 06:46:31 marlin mimedefang-multiplexor[1229]: [ID 980602 mail.info] Slave 3 stderr: Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_FTP() is deprecated at (eval 104) line 1.
> Feb 11 06:46:31 marlin mimedefang-multiplexor[1229]: [ID 980602 mail.info] Slave 3 stderr: Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_PERROR() is deprecated at (eval 118) line 1.
> Feb 11 06:46:31 marlin mimedefang-multiplexor[1229]: [ID 980602 mail.info] Slave 3 stderr: Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_FAC() is deprecated at (eval 121) line 1.
> Feb 11 06:46:31 marlin mimedefang-multiplexor[1229]: [ID 980602 mail.info] Slave 3 stderr: Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_PRI() is deprecated at (eval 123) line 1.
> Feb 11 06:46:31 marlin mimedefang-multiplexor[1229]: [ID 980602 mail.info] Slave 3 stderr: Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_MAKEPRI() is deprecated at (eval 125) line 1.
I can reproduce a similar error like this:
$ perl -MUnix::Syslog -we 'eval { Unix::Syslog::LOG_FOO() }'
Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_FOO() is deprecated at -e line 1.
(the function then fails, but you do not see the failure because of the eval). If your syslog.h doesn't define LOG_AUTHPRIV, fetching the constant Unix::Syslog::LOG_AUTHPRIV() will give the same warning. I don't exactly know what triggers this, could be something in mimedefang.pl.
The best fix seems to be to not use Unix::Syslog.
> Also, what are the consequences? Does this mean there are other errors occuring that are not getting logged?
Not likely. It looks like your Unix::Syslog is limited, but not completely crippled. If Sys::Sylog works better, I suggest you use that instead (if you installed Unix::Syslog especially for this, remove it).
> If I put my change in and just let it use Sys::Syslog, would that actually work?
Yes.
> What would I lose by doing that?
The ability to easily upgrade when a new mimedefang version comes out.
--
Jan-Pieter Cornet <johnpc at xs4all.net>
Systeembeheer XS4ALL Internet bv
Internet: www.xs4all.nl
Contact: www.xs4all.nl/contact
More information about the MIMEDefang
mailing list