Subject: | bug in Net-Ping-2.68-0 |
Date: | Mon, 6 Aug 2018 09:11:01 +0100 |
To: | bug-Net-Ping [...] rt.cpan.org |
From: | Mike Scott <mike [...] scottsonline.org.uk> |
Net::Ping reports
Argument "2.020_03" isn't numeric in numeric ge (>=) at
/usr/local/lib/perl5/5.26/Net/Ping.pm line 1801.
on first call.
This relates to the code segment at 1801:
# address check
# new way
if ($Socket::VERSION >= 1.94) {
my %hints = (
It's not safe to assume versions are numeric - this is on FreeBSD 11.x,
where I see that
% grep VERS /usr/local/lib/perl5/5.26/mach/Socket.pm
our $VERSION = '2.020_03'; # patched in perl5.git
XSLoader::load(__PACKAGE__, $VERSION);
The intricacies of perl module version numbers are not something I'm
familiar with; even if FBSD be breaking a convention, version checks
ought to be done safely where rules cannot be enforced.
% perl -v
This is perl 5, version 26, subversion 2 (v5.26.2) built for
i386-freebsd-thread-multi-64int
% uname -a
FreeBSD data.scotts 11.2-RELEASE FreeBSD 11.2-RELEASE #0: Wed Jul 25
10:34:56 BST 2018 mike@data.scotts:/usr/src/sys/i386/compile/DATA i386
%
--
Mike Scott
Harlow, Essex, England