Skip Menu |

This queue is for tickets about the FindBin-libs CPAN distribution.

Report information
The Basics
Id: 83219
Status: resolved
Priority: 0/
Queue: FindBin-libs

People
Owner: LEMBARK [...] cpan.org
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.65.1
Fixed in: (no value)



Subject: 1.65.1 is logically < 1.64 in perl version logic.

 perl -Mversion -e 'die if version->parse("1.64") < version->parse("1.65.1")'

Unfortunately,  Perl  interprets 1.64 as being similar to 1.640.0  and 1.65.1 is logically < 1.640.0 

To simplify the logic: 

1.64 is treated as a float, ie: 1.640000 
1.65.1 is treated as 3 decimals, which when converted to float is  1.065.001  ->  1.065001

1.640000 > 1.065001 

 perl "-Mversion 0.77" "-MData::Dump pp" -e "pp [ version->parse(q{1.64}), version->parse(q{1.65.1}) ]"

[

  bless({ original => 1.64, version => [1, 640] }, "version"),

  bless({ original => "1.65.1", qv => 1, version => [1, 65, 1] }, "version"),

]

 

Easy solutions:

1. Forget 3-part and make the next release one of the following versions: 

     1.65   , 1.651 , 1.6501 , 1.65001 , 1.6500001 

2. Translate to 3-part properly and release the next version as one of the following:

    1.650.0 , 1.650.1 , 1.650.2 

 

Thanks in advance. Sorry that versions are so annoying :( 

A +1 from me. We have a modules.t test file in our code repo that checks for minimum version numbers of installed modules that is now failing because of this numbering change.
On Tue Mar 05 11:54:41 2013, PETDANCE wrote: Show quoted text
> A +1 from me. We have a modules.t test file in our code repo that > checks for minimum version numbers of installed modules that is now > failing because of this numbering change.
Q: Would the version number '1.7' suffice?
On 2013-03-15 04:24:28, LEMBARK wrote:
Show quoted text
> On Tue Mar 05 11:54:41 2013, PETDANCE wrote:
> > A +1 from me. We have a modules.t test file in our code repo that
> > checks for minimum version numbers of installed modules that is now
> > failing because of this numbering change.
>
> Q: Would the version number '1.7' suffice?

1.70 is preferred, as its less likely to confuse any downstream who aren't normalizing versions properly.

1.7 and 1.70 and 1.700 are all "equivalent" as far as perl are concerned, but a decreasing mantissa increases the odds downstream will mess it up, as downstream are occasionally prone to  thinking "1.7 < 1.64", even though that is not the case in Perl.

perl "-Mversion 0.77" "-MData::Dump pp" -e 'pp [ sort { $a <=> $b } version->parse(q{1.64}), version->parse(q{1.65.1}), version->parse(q{1.7}), version->parse(q{1.70}), version->parse(q{1.700}) ]'
[
  bless({ original => "1.65.1", qv => 1, version => [1, 65, 1] }, "version"),
  bless({ original => 1.64, version => [1, 640] }, "version"),
  bless({ original => 1.7, version => [1, 700] }, "version"),
  bless({ original => "1.70", version => [1, 700] }, "version"),
  bless({ original => "1.700", version => [1, 700] }, "version"),
]



Finally found a fix that may keep working: Makefile.PL uses '2.00', .pm has a v-string (vs. VERSION_FROM, which screwed it all up before). At this point you should see '2.00' which is guaranteed to avoid issues with sub-string versions.