Skip Menu |

This queue is for tickets about the version CPAN distribution.

Report information
The Basics
Id: 101652
Status: rejected
Priority: 0/
Queue: version

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.9912
Fixed in: (no value)



Subject: Dotted versions hamstrung by VERSION_MAX

A curious discovery I noticed reading the tests.

 

2**31 is considered "too big" in a part in a dotted decimal.

But 2**40 works perfectly for a floating part in a floating version.

perl -Mversion -E'use warnings; use strict; say version->new(q[1.] . 2**40) <=> version->new(q[1.] . ( 2**40+1) )'
-1


perl -Mversion -E'use warnings; use strict; say version->new(q[1.1.] . 2**31)->normal'
Integer overflow in version at -e line 1.
v1.1.2147483647
 

I'm not convinced the second of these has to be that way.

On Wed Jan 21 02:01:19 2015, KENTNL wrote: Show quoted text
> A curious discovery I noticed reading the tests. > > 2**31 is considered "too big" in a part in a dotted decimal.
Won't fix. There is no reason to support a larger limit to the elements of a dotted decimal, which is intended to used as a list of "small" integers. The ordinary decimal version have to support essentially floating point notation, which relies on the underlying Perl NV, but dotted decimals don't have to support that many digits in a single element. John