Skip Menu |

This queue is for tickets about the Module-Metadata CPAN distribution.

Maintainer(s)' notes

Attention bug reporters: issues MUST include the version of Module::Metadata that you are running that exhibit the stated symptoms. thank you!

Report information
The Basics
Id: 114263
Status: rejected
Priority: 0/
Queue: Module-Metadata

People
Owner: ether [...] cpan.org
Requestors: nomad [...] null.net
Cc:
AdminCc:

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



Subject: Trial version strangeness
Date: Mon, 9 May 2016 17:09:38 +0200
To: bug-Module-Metadata [...] rt.cpan.org
From: Mark Lawrence <nomad [...] null.net>
It appears that Module::Metadata mangles the -TRIAL alternative format of $VERSION $UNDERSCORE $INTEGER: #!/usr/bin/env perl use strict; use warnings; use Module::Metadata; use Data::Dumper; our $VERSION = '0.0.1_1'; print Dumper( Module::Metadata->new_from_file($0) ); #$VAR1 = bless( # { # 'module' => 'main', # 'pod' => {}, # 'versions' => { # 'main' => bless( # { # 'original' => '0.0.1_1', # 'qv' => 1, # 'version' => [ 0, 0, 11 ], # 'alpha' => 1 # }, # 'version' # ) # }, # 'pod_headings' => [], # 'version' => $VAR1->{'versions'}{'main'}, # 'inc' => undef, # 'filename' => '/home/mark/src/optargs2/x', # 'packages' => [ 'main' ], # 'collect_pod' => undef # }, # 'Module::Metadata' #); [ 0, 0, 11 ] is certainly not '0.0.1_1' and I know Module::Build at least is using the arrayref result in preference to the original. -- Mark Lawrence
On 2016-05-09 08:09:49, nomad@null.net wrote: Show quoted text
> It appears that Module::Metadata mangles the -TRIAL alternative format
What version of Module::Metadata is this from?
On 2016-05-09 10:16:55, ETHER wrote: Show quoted text
> On 2016-05-09 08:09:49, nomad@null.net wrote:
> > It appears that Module::Metadata mangles the -TRIAL alternative format
> > What version of Module::Metadata is this from?
And also what version of version.pm?
Subject: Re: [rt.cpan.org #114263] Trial version strangeness
Date: Mon, 9 May 2016 23:06:01 +0200
To: Karen Etheridge via RT <bug-Module-Metadata [...] rt.cpan.org>
From: nomad [...] null.net
Apologies for not submitting a thorough report. Versions are as follows: This is perl 5, version 22, subversion 1 (v5.22.1) built for i586-linux-gnu-thread-multi-64int (with 58 registered patches, see perl -V for more detail) E/ET/ETHER/Module-Metadata-1.000027.tar.gz /usr/share/perl5/Module/Metadata.pm Installed: 1.000027 CPAN: 1.000027 up to date David Golden (DAGOLDEN) dagolden@cpan.org J/JP/JPEACOCK/version-0.9916.tar.gz /usr/lib/i386-linux-gnu/perl5/5.22/version.pm Installed: 0.9916 CPAN: 0.9916 up to date John Peacock (JPEACOCK) jpeacock@cpan.org Running on a Debian testing system. -- Mark Lawrence
On 2016-05-09 14:06:16, nomad@null.net wrote: Show quoted text
> Apologies for not submitting a thorough report. Versions are as > follows: > > E/ET/ETHER/Module-Metadata-1.000027.tar.gz
I believe this issue is fixed in the current trial series (latest is 1.000032), which barring new issues, I anticipate will be released as stable in a month or so. There is a test case for this scenario in the test suite, which passes: https://metacpan.org/source/ETHER/Module-Metadata-1.000032-TRIAL/t/extract-version.t#L457-465
Subject: Re: [rt.cpan.org #114263] Trial version strangeness
Date: Tue, 10 May 2016 01:00:52 +0200
To: Karen Etheridge via RT <bug-Module-Metadata [...] rt.cpan.org>
From: nomad [...] null.net
On Mon May 09, 2016 at 06:07:18PM -0400, Karen Etheridge via RT wrote: Show quoted text
> > I believe this issue is fixed in the current trial series (latest is > 1.000032), which barring new issues, I anticipate will be released as > stable in a month or so. > > There is a test case for this scenario in the test suite, which > passes: > https://metacpan.org/source/ETHER/Module-Metadata-1.000032-TRIAL/t/extract-version.t#L457-465
Hmm... Running the same script from the original report on that trial release I still get same data structure: mark@mlt:~/.cpanm/work/1462833780.22926/Module-Metadata-1.000032$ perl -Ilib j $VAR1 = bless( { 'version' => bless( { 'version' => [ 0, 0, 11 ], # <========= ???? 'original' => '0.0.1_1', 'qv' => 1, 'alpha' => 1 }, 'version' ), 'inc' => undef, 'collect_pod' => undef, 'pod_headings' => [], 'packages' => [ 'main' ], 'filename' => '/home/mark/.cpanm/work/1462833780.22926/Module-Metadata-1.000032/j', 'pod' => {}, 'module' => 'main', 'versions' => { 'main' => $VAR1->{'version'} } }, 'Module::Metadata' ); If that is actually expected (and I see that the stringified $meta->version is in fact "0.0.1_1" then perhaps this report is not actually about Module::Metadata but Module::Build. -- Mark Lawrence
On 2016-05-09 16:01:12, nomad@null.net wrote: 457-465 Show quoted text
> > Hmm... Running the same script from the original report on that trial > release I still get same data structure:
Show quoted text
> If that is actually expected (and I see that the stringified > $meta->version is in fact "0.0.1_1" then perhaps this report is not > actually about Module::Metadata but Module::Build.
Apologies! I took a closer look at the internals and I see the (non)issue now. You can reproduce it with simply version.pm: perl -MData::Dumper -wle'print Dumper(version->parse("0.0.1_1"))' $VAR1 = bless( { 'original' => '0.0.1_1', 'qv' => 1, 'version' => [ 0, 0, 11 ], 'alpha' => 1 }, 'version' ); The 'version' field contains the numified representation of the version, broken into tuples, so "0.0.11" is absolutely correct here for that value. This may or may not be an issue with Module::Build; nevertheless I'd encourage you to file a ticket there and I'll be one of the people to see it and comment :) (Do please include what facet of Module::Build is using the numified version where you feel this is incorrect.)
On Mon May 09 11:09:49 2016, nomad@null.net wrote: Show quoted text
> It appears that Module::Metadata mangles the -TRIAL alternative format > of $VERSION $UNDERSCORE $INTEGER: > > #!/usr/bin/env perl > use strict; > use warnings; > use Module::Metadata; > use Data::Dumper; > > our $VERSION = '0.0.1_1'; > > print Dumper( Module::Metadata->new_from_file($0) ); > > #$VAR1 = bless( > # { > # 'module' => 'main', > # 'pod' => {}, > # 'versions' => { > # 'main' => bless( > # { > # 'original' => '0.0.1_1', > # 'qv' => 1, > # 'version' => [ 0, 0, 11 ], > # 'alpha' => 1 > # }, > # 'version' > # ) > # }, > # 'pod_headings' => [], > # 'version' => $VAR1->{'versions'}{'main'}, > # 'inc' => undef, > # 'filename' => '/home/mark/src/optargs2/x', > # 'packages' => [ 'main' ], > # 'collect_pod' => undef > # }, > # 'Module::Metadata' > #); > > > [ 0, 0, 11 ] is certainly not '0.0.1_1' and I know Module::Build at > least is using the arrayref result in preference to the original.
The behavior of version objects changed in the last year with regards to versions containing underscore. To quote the Lyon consensus: "underscore should no longer be used as a tuple separator in vstrings or vstring-like strings". Our apologies for the resultant confusion. Leon
Subject: Re: [rt.cpan.org #114263] Trial version strangeness
Date: Tue, 10 May 2016 10:50:45 +0200
To: Leon Timmermans via RT <bug-Module-Metadata [...] rt.cpan.org>
From: nomad [...] null.net
On Tue May 10, 2016 at 03:57:51AM -0400, Leon Timmermans via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=114263 >
> > > > [ 0, 0, 11 ] is certainly not '0.0.1_1' and I know Module::Build at > > least is using the arrayref result in preference to the original.
> > The behavior of version objects changed in the last year with regards > to versions containing underscore. To quote the Lyon consensus: > "underscore should no longer be used as a tuple separator in vstrings > or vstring-like strings".
Unfortunately the statement "underscore should no longer be used as a tuple separator in vstrings or vstring-like strings" does not fully describe exactly what is allowed where. I have just read through what little information I could find on this topic from the Lyon consensus (or compromise) and some related discussion in [1], but my level of enlightenment remains low. [1] https://rt.cpan.org/Public/Bug/Display.html?id=110882 In any event this is no longer a Module::Metadata issue and I'll open another issue against Module::Build to cover the exact issue that I'm facing. Mark -- Mark Lawrence