Skip Menu |

This queue is for tickets about the version CPAN distribution.

Report information
The Basics
Id: 19345
Status: resolved
Priority: 0/
Queue: version

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

Bug Information
Severity: Important
Broken in: 0.59
Fixed in: (no value)



Subject: our $VERSION = v1.2; # in my old packages is not compatible to v1.2.0 (1.002_000)
v1.2 (length = 2) is not the same like v1.2.0 (length = 3) numeric: v1.2 ~ 1.002 v1.2.0 ~ 1.002_000
Subject: Re: [rt.cpan.org #19345] our $VERSION = v1.2; # in my old packages is not compatible to v1.2.0 (1.002_000)
Date: Thu, 18 May 2006 10:27:43 -0400
To: bug-version [...] rt.cpan.org
From: John Peacock <jpeacock [...] rowman.com>
Steffen Winkler via RT wrote: Show quoted text
> v1.2 (length = 2) is not the same like v1.2.0 (length = 3) > > numeric: > v1.2 ~ 1.002 > v1.2.0 ~ 1.002_000
Show me the code that you are using. It _is_ true that use version; our $VERSION = version->new(1.2); is not the same thing as use version; our $VERSION = version->new(1.2.0); NOTE the lack of 'v' in either of those initializations (the second will work only in Perl >= 5.8.2). See the discussion of "Numeric Versions" for why you need to be consistent in your usage in order to get the expected results. You can also use the recommendation from Perl Best Practices: use version; our $VERSION = qv("1.2"); which will do what I think you expected in all circumstances. John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748
Excuse me. Thank you. I'm lucky. It works.