Rather than test with ">=", you should use either UNIVERSAL::VERSION or
parse the module's version to a version.pm object first
(version->parse($Some::Module::VERSION).

David

On Thu, Jan 3, 2019 at 9:49 PM James E Keenan <jkee...@pobox.com> wrote:

> 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
>


-- 
David Golden <x...@xdg.me> • https://xdg.me/ • Twitter/GitHub: @xdg

Reply via email to