Skip Menu |
 

This queue is for tickets about the Perl-Version CPAN distribution.

Report information
The Basics
Id: 119447
Status: open
Priority: 0/
Queue: Perl-Version

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

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



Subject: Version comparison does not match version module behavior.
Download (untitled) / with headers
text/plain 860b
Consider test program: #!/usr/bin/perl use strict; use warnings; use version 0.77; use Perl::Version; use Test::More; my $v1 = 'v0.10.1_01'; my $v2 = 'v0.10.2'; is( Perl::Version->new( $v1 ) <=> $v2, version->parse( $v1 ) <=> $v2 ); done_testing; exit( 0 ); With version 0.9912, it passes: ok 1 1..1 With version 0.9913 (an later), it fails: not ok 1 # Failed test at test.t line 12. # got: '-1' # expected: '1' 1..1 # Looks like you failed 1 test of 1. version 0.9912 interprets 'v0.10.1_01' as 'v0.10.1.1' (+alpha flag), but version 0.9913 interprets it is 'v0.10.101' (+alpha flag). The change in version module is intentional (I guess it is because Perl interprets v-string v0.10.1_01 as v0.10.101) so it unlikely to be reverted. That means Perl::Version should adopt new version behavior to be compatible with version module.
Subject: Re: [rt.cpan.org #119447] Version comparison does not match version module behavior.
Date: Sat, 24 Dec 2016 17:48:39 -0800
To: bug-Perl-Version [...] rt.cpan.org
From: brian d foy <brian.d.foy [...] gmail.com>
Download (untitled) / with headers
text/plain 224b
Noted, at it's at Christmas so I don't have time to look at this immediately. And, I think there's some work to do to decide if we should track version. There's a lot of pain there. If someone wants to submit a patch.... :)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.