Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How avoid "argument isn't numeric" warning when evaluating $VERSION?

2 views
Skip to first unread message

James E Keenan

unread,
Jan 3, 2019, 10:00:03 PM1/3/19
to cpan-w...@perl.org
Suppose that in package Someones::Module I have:

#####
$Someones::Module::VERSION = '1.4417_001';
#####

And then in a different module I have:

#####
die "Need more recent version of Someones::Module" unless
$Someones::Module::VERSION >= "1.40";
#####

This will generate a warning like this:

#####
Argument "1.4417_001" isn't numeric in numeric ge (>=) at ...
#####

I would like to submit a patch for the relevant module. What is the
recommended way of numifying $Someones::Module::VERSION in the '>='
comparison?

Or is there a better approach?

Thank you very much.
Jim Keenan
0 new messages