Skip Menu |

This queue is for tickets about the Data-VString CPAN distribution.

Report information
The Basics
Id: 18100
Status: resolved
Priority: 0/
Queue: Data-VString

People
Owner: Nobody in particular
Requestors: tmcd [...] panix.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.000_003
Fixed in: 0.000004



Subject: Doc bug?
Module documentation at http://search.cpan.org/~ferreira/Data-VString-0.000_003/lib/ Data/VString.pm has: And that makes '0.1' > '0.2' '0.2.1' < '0.1.3' '0.11.10' > '0.10.10.10' and also '0.1' > '0.1.0' (because the first one is shorter). That doesn't make sense to me. 11.10 > 10.10.10 makes sense to me, because any version 11 will be later / greater than any version 10 thing. But how can 0.1 be > 0.2? 0.2.1 < 0. 1.3? 0.1 > 0.1.0? They look backwards. If that's the behavior of the code, then I would say the code's design is not useful. The examples below show the behavior I expect: vstring_satisfy('0.1.1', '> 0, < 0.2, != 0.1.0'); # true $le = vstring_cmp('1.2.3', '>=', '3.2.1'); # not ok I think a better example is to show that 10.0.0 > 9.9.9 -- because if you compare them as strings, "10.0.0" < "9.9.9". That is, this example shows why you can't just use regular strings. - Tim McDaniel, tmcd@panix.com
Hm, maybe I took too long to answer to this bug. This has been fixed on 0.0.4 release back at March 19, 2007. On Fri Mar 10 10:57:25 2006, guest wrote: Show quoted text
> Module documentation at http://search.cpan.org/~ferreira/Data-VString- > 0.000_003/lib/ > Data/VString.pm has: > > And that makes > > '0.1' > '0.2' > > '0.2.1' < '0.1.3' > > '0.11.10' > '0.10.10.10' > > and also '0.1' > '0.1.0' (because the first one is shorter). > > That doesn't make sense to me. 11.10 > 10.10.10 makes sense to me, > because any version > 11 will be later / greater than any version 10 thing. But how can 0.1 > be > 0.2? 0.2.1 < 0. > 1.3? 0.1 > 0.1.0? They look backwards. If that's the behavior of > the code, then I would > say the code's design is not useful. The examples below show the > behavior I expect: > > vstring_satisfy('0.1.1', '> 0, < 0.2, != 0.1.0'); # true > > $le = vstring_cmp('1.2.3', '>=', '3.2.1'); # not ok > > I think a better example is to show that 10.0.0 > 9.9.9 -- because if > you compare them as > strings, "10.0.0" < "9.9.9". That is, this example shows why you > can't just use regular > strings. > > - Tim McDaniel, tmcd@panix.com