[Mimedefang] mimedefang.pl spilling "Use of inherited AUTOLOAD for non-method" errors

Chris Hoogendyk hoogendyk at bio.umass.edu
Fri Feb 11 17:19:28 EST 2011


Solaris 10u7 on SPARC
perl 5.8.8 (coolstack)
gcc -- gccfss 4.2.0 (cooltools)
mimedefang 2.68
Unix::Syslog 1.1

Things seem to work in general, but we keep seeing

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.

everytime the mimedefang.pl is invoked by mimedefang multiplexer, these same errors hit 
/var/adm/mail.log.

I made a copy of mimedefang.pl in my own home directory and found I could produce those same errors 
by invoking it manually:

marlin:/u1/home/bio/hoogendyk$ ./mimedefang.pl
Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_AUTHPRIV() is deprecated at (eval 90) line 1.
Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_FTP() is deprecated at (eval 91) line 1.
Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_PERROR() is deprecated at (eval 105) line 1.
Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_FAC() is deprecated at (eval 108) line 1.
Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_PRI() is deprecated at (eval 110) line 1.
Use of inherited AUTOLOAD for non-method Unix::Syslog::LOG_MAKEPRI() is deprecated at (eval 112) line 1.
Usage: mimedefang.pl [-f filter] workdir | -server | -test | -structure |
                      -features | -validate | -parse-and-dump


I went back to the directory where I built Unix::Syslog and did the make test again, and everything 
looks good.Unix::Syslog is the current release.


So I vi'd my private copy of mimedefang.pl. Then I changed it as follows:

         sub md_openlog ($$)
         {
                 print "entering md_openlog\n";
                 my ($tag, $facility) = @_;

                 my $openlog;

                 # Try Unix::Syslog first, then Sys::Syslog
                 eval qq{use Unix::Syslog qw( :macros ); };
                 #if(!$@) { <-- commented out this line and added the following
                 if (0) {
                         ($openlog, $_syslogsub) = _wrap_for_unix_syslog();
                 } else {
                         eval qq{use Sys::Syslog ();};
                         if(!$@) {
                                 ($openlog, $_syslogsub) = _wrap_for_sys_syslog();
                         } else {
                                 die q{Unable to detect either Unix::Syslog or Sys::Syslog};
                         }
                 }
                 print "leaving md_openlog\n";

                 return $openlog->($tag, 'pid,ndelay', $facility);
         }


That is, I commented out the if statement and replaced it with "if (0) {". Then the errors went away.

I'm not enough of a perl wonk to fix this. I tried updating mimedefang to 2.71, but that 
mimedefang.pl spilled the same errors when run manually.

Can someone tell me how to fix this?

Also, what are the consequences? Does this mean there are other errors occuring that are not getting 
logged? If I put my change in and just let it use Sys::Syslog, would that actually work? What would 
I lose by doing that? At present the modified code only exists in my personal copy which is not 
being run.


TIA


-- 
---------------

Chris Hoogendyk

-
    O__  ---- Systems Administrator
   c/ /'_ --- Biology&  Geology Departments
  (*) \(*) -- 140 Morrill Science Center
~~~~~~~~~~ - University of Massachusetts, Amherst

<hoogendyk at bio.umass.edu>

---------------

Erdös 4





More information about the MIMEDefang mailing list