[Mimedefang] Warning after upgrading to Perl 5.24 on FreeBSD

Franz Schwartau franz at electromail.org
Fri Apr 21 05:33:26 EDT 2017


Dear list,

after upgrading Perl to 5.24 on FreeBSD the variable
$Sys::Syslog::VERSION isn't numeric any more:

$ perl -e 'use Sys::Syslog; print $Sys::Syslog::VERSION;'
0.33_01

Thus line 660 in mimedefang.pl throws a warning:

if( $Sys::Syslog::VERSION < 0.16 ) {

Maybe it's better to use a lexical compare:

if( $Sys::Syslog::VERSION lt "0.16" ) {

	Best regards
		Franz
-------------- next part --------------
diff --git a/mimedefang.pl.in b/mimedefang.pl.in
index a8375f1..5c81a1f 100755
--- a/mimedefang.pl.in
+++ b/mimedefang.pl.in
@@ -657,7 +657,7 @@ sub time_str {
 	{
 
 		my $openlog  = sub {
-			if( $Sys::Syslog::VERSION < 0.16 ) {
+			if( $Sys::Syslog::VERSION lt "0.16" ) {
 				# Older Sys::Syslog versions still need
 				# setlogsock().  RHEL5 still ships with 0.13 :(
 				Sys::Syslog::setlogsock([ 'unix', 'tcp', 'udp' ]);


More information about the MIMEDefang mailing list