Warning after upgrading to Perl 5.24 on FreeBSD

Franz Schwartau <[email protected]>
Newsgroups gmane.mail.mimedefang
Message-ID <[email protected]>
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

_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
mimedefang.pl.in.txt (text/plain, 429 B)
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' ]);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.