Skip Menu |

This queue is for tickets about the version CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: VDB [...] cpan.org
Cc: DBOOK [...] cpan.org
ether [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.9913
  • 0.9914
  • 0.9915
  • 0.9916
  • 0.9917
Fixed in: (no value)



Subject: alpha version ordering is broken
Consider a simple test: use version; my $v = version->parse( "v0.11.2_4" ); print $v->normal, "\n"; If version < 0.9913 the test prints v0.11.2_4 Internally it is represented as FOUR-component array [ 0, 11, 2, 4 ]. Semantics of Alpha version is not well-defined in the documentation, but I assume this is proper result, because it gives order: v0.11.2 < v0.11.2_4 < v.0.11.3. If version >= 0.0013, the test prints v0.11.24 Internally it is represented as THREE-component array [ 0, 11, 24 ]. It breaks version ordering. Current version order is quite useless: v0.11.2 < v0.11.3 < ... < v0.11.23 < v.0.11.2_4.
On Sun Dec 04 17:20:59 2016, VDB wrote: Show quoted text
> Consider a simple test: > > use version; > my $v = version->parse( "v0.11.2_4" ); > print $v->normal, "\n"; > > If version < 0.9913 the test prints > > v0.11.2_4 > > Internally it is represented as FOUR-component array [ 0, 11, 2, 4 ]. > Semantics of Alpha version is not well-defined in the documentation, > but I assume this is proper result, because it gives order: v0.11.2 < > v0.11.2_4 < v.0.11.3. > > If version >= 0.0013, the test prints > > v0.11.24 > > Internally it is represented as THREE-component array [ 0, 11, 24 ]. > > It breaks version ordering. Current version order is quite useless: > v0.11.2 < v0.11.3 < ... < v0.11.23 < v.0.11.2_4.
This was an intentional change to make it more consistent. See https://github.com/Leont/version-bad/pull/1 . In version tuples the underscore is no longer considered a separator but merely an indication of alpha version. It is recommended not to use underscores with version tuples, but instead to upload your distribution with -TRIAL in the name to prevent indexing (which is done automatically by dzil release --trial).
I would expect such a breaking change is documented in Changes. However, version's Changes is automatically generated and useless stuff: it is not recognized by metacpan (which usually shows changes in the current release at the top of distribution page, but not for version), for human reader changes provides lots of noise (branch created/merged/tag added) with no value.
On Wed Dec 07 16:31:42 2016, VDB wrote: Show quoted text
> I would expect such a breaking change is documented in Changes. > > However, version's Changes is automatically generated and useless > stuff: it is not recognized by metacpan (which usually shows changes > in the current release at the top of distribution page, but not for > version), for human reader changes provides lots of noise (branch > created/merged/tag added) with no value.
Agreed. Unfortunately this distribution has a nonstandard layout where the useful changes are documented in README, which should probably be in the module documentation somewhere if not fixed. This change can be found here: https://metacpan.org/source/JPEACOCK/version-0.9917/README#L38
On Wed Dec 07 17:15:20 2016, DBOOK wrote: Show quoted text
> Agreed. Unfortunately this distribution has a nonstandard layout where > the useful changes are documented in README, which should probably be > in the module documentation somewhere if not fixed. This change can be > found here: https://metacpan.org/source/JPEACOCK/version- > 0.9917/README#L38
I see. Why don't you rename README to Changes? Reformatting it to meet Changes requirements does not look too difficult.
Fix will be included in 0.9918 (soonish)