Re: [Module::Build] version.pm and version number comparison problem
Status: Beta
Brought to you by:
kwilliams
|
From: <and...@fr...> - 2006-02-02 09:00:21
|
>>>>> On Thu, 02 Feb 2006 15:06:28 +1100, Ron Savage <ro...@sa...> said:
> Hi Folks
> Just wondering:
> I'm using version V 0.53 and Module::Build V 0.2611.
> When I try to install SQL::Translator (for example) I get:
> Checking whether your kit is complete...
> Looks good
> * Version v1.0.0 of Text::RecordParser is installed, but we prefer to have 0.02
> ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
> of the modules indicated above before proceeding with this installation.
> The Build.PL for SQL::Translator says:
> recommends => {
> 'GD' => 0,
> 'GraphViz' => 0,
> 'IO::File' => 0,
> 'IO::Scalar' => 0,
> 'Spreadsheet::ParseExcel' => 0.2602,
> 'Text::ParseWords' => 0,
> 'Text::RecordParser' => 0.02,
> 'XML::Writer' => 0.500,
> 'XML::XPath' => 1.13,
> 'YAML' => 0.39,
> },
> and Text::RecordParser reports itself as being v1.0.0 (yes, with the goddam 'v',
> as if we needed it :-().
Nono, the relevant line in Text::RecordParser is
our $VERSION = version->new('1.0.0');
So do not blame the v, it is just version.pm that helps us a little
with overloading.
> So, I see where the components of the error message (v1.0.0 and 0.02) come from.
> My question is: Should this faulty comparison be something which is/can be
> handled properly by version.pm, meaning V 1.0.0 really is reported as being >
> V 0.02, or is this something we have to live with?
I suppose this is a bug in Module::Build, because version.pm can
compare 1.0.0 and 0.02 as you would expect:
% perl -le '
use version 0.53;
print version->new("1.0.0") > 0.02 ? "ok" : "not ok";
'
ok
--
andreas
|