Fix comparing versions.

In Perl, versions are not numbers. While they may look like numbers,
they are not, they are kind of special strings and should be treated as
such.

Reported by:	bjornr isnic is
Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2016-10-12 10:17:47 +00:00
parent 309eb888fb
commit d2ee114906
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=423845
2 changed files with 18 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= Net-Server
PORTVERSION= 2.008
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-

View File

@ -0,0 +1,17 @@
--- lib/Net/Server/Log/Sys/Syslog.pm.orig 2014-05-05 18:43:15 UTC
+++ lib/Net/Server/Log/Sys/Syslog.pm
@@ -39,12 +39,12 @@ sub initialize {
# do nothing - assume they have what they want
} else {
if (! defined $prop->{'syslog_logsock'}) {
- $prop->{'syslog_logsock'} = ($Sys::Syslog::VERSION < 0.15) ? 'unix' : '';
+ $prop->{'syslog_logsock'} = ($Sys::Syslog::VERSION lt '0.15') ? 'unix' : '';
}
if ($prop->{'syslog_logsock'} =~ /^(|native|tcp|udp|unix|inet|stream|console)$/) {
$prop->{'syslog_logsock'} = $1;
} else {
- $prop->{'syslog_logsock'} = ($Sys::Syslog::VERSION < 0.15) ? 'unix' : '';
+ $prop->{'syslog_logsock'} = ($Sys::Syslog::VERSION lt '0.15') ? 'unix' : '';
}
}