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: 72111
Status: rejected
Priority: 0/
Queue: Module-Metadata

People
Owner: Nobody in particular
Requestors: xenoterracide [...] gmail.com
Cc:
AdminCc:

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



Subject: version info created for invalid versions
Date: Tue, 1 Nov 2011 23:40:41 -0500
To: bugs-module-metadata [...] rt.cpan.org
From: Caleb Cushing <xenoterracide [...] gmail.com>
Module::Metadata incorrectly finds a version in this file (which I have attached and pasted below) package InvalidVersion; our $VERSION = 0.1.0; 1; I have also included a script that demonstrates that the version is not a valid anything. This is the output of that script on my system. defined version not ok version is: '$VAR1 = ''; Module::Metadata says version is: 'v0.1.0' Module::Extract::VERSION says version is: '' module_info Module::Metadata slave-iv Name: Module::Metadata Version: 1.000007 Directory: /home/xenoterracide/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2 File: /home/xenoterracide/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Module/Metadata.pm Core module: no -- Caleb Cushing http://xenoterracide.com

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #72111] AutoReply: version info created for invalid versions
Date: Tue, 1 Nov 2011 23:56:59 -0500
To: bug-Module-Metadata [...] rt.cpan.org
From: Caleb Cushing <xenoterracide [...] gmail.com>
err.. included slightly out of date version of script... this one uses Data::Dumper also note that the pu branch of Test::Version should pass if the bug has been corrected https://github.com/xenoterracide/Test-Version/tree/pu -- Caleb Cushing http://xenoterracide.com

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #72111] version info created for invalid versions
Date: Wed, 2 Nov 2011 10:49:38 -0400
To: bug-Module-Metadata [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Wed, Nov 2, 2011 at 12:40 AM, Caleb Cushing via RT <bug-Module-Metadata@rt.cpan.org> wrote: Show quoted text
> Module::Metadata incorrectly finds a version in this file (which I > have attached and pasted below) > > package InvalidVersion; > our $VERSION = 0.1.0; > 1;
That is a valid v-string. Leading "v" is optional with multiple decimal points. C.f. perldata. Module::Metadata finds it and normalizes it to have a leading v. It's bad practice to omit the leading "v" because "0.1.0" is very different that "0.1", whereas "v0.1" is the same as "v0.1.0" (or "0.1.0" for that matter.) Thus, it looks like the bug is in Module::Extract::VERSION. -- David
Subject: Re: [rt.cpan.org #72111] version info created for invalid versions
Date: Wed, 2 Nov 2011 11:22:00 -0500
To: bug-Module-Metadata [...] rt.cpan.org
From: Caleb Cushing <xenoterracide [...] gmail.com>
On Wed, Nov 2, 2011 at 9:51 AM, David Golden via RT <bug-Module-Metadata@rt.cpan.org> wrote: Show quoted text
> That is a valid v-string.  Leading "v" is optional with multiple > decimal points. C.f. perldata. > > Module::Metadata finds it and normalizes it to have a leading v.  It's > bad practice to omit the leading "v" because "0.1.0" is very different > that "0.1", whereas "v0.1" is the same as "v0.1.0" (or "0.1.0" for > that matter.) > > Thus, it looks like the bug is in Module::Extract::VERSION.
It's not even valid data according to perl how can it be a valid v string. Perl doesn't recognize this as data. You dump the variable and there's nothing in it... and that's dumping it directly... no parsing, nothing. -- Caleb Cushing http://xenoterracide.com
Subject: Re: [rt.cpan.org #72111] version info created for invalid versions
Date: Wed, 2 Nov 2011 12:28:41 -0400
To: Caleb Cushing via RT <bug-Module-Metadata [...] rt.cpan.org>
From: Peter Rabbitson <rabbit [...] rabbit.us>
On Wed, Nov 02, 2011 at 12:22:11PM -0400, Caleb Cushing via RT wrote: Show quoted text
> Queue: Module-Metadata > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=72111 > > > On Wed, Nov 2, 2011 at 9:51 AM, David Golden via RT > <bug-Module-Metadata@rt.cpan.org> wrote:
> > That is a valid v-string.  Leading "v" is optional with multiple > > decimal points. C.f. perldata. > > > > Module::Metadata finds it and normalizes it to have a leading v.  It's > > bad practice to omit the leading "v" because "0.1.0" is very different > > that "0.1", whereas "v0.1" is the same as "v0.1.0" (or "0.1.0" for > > that matter.) > > > > Thus, it looks like the bug is in Module::Extract::VERSION.
> > It's not even valid data according to perl how can it be a valid v > string. Perl doesn't recognize this as data. You dump the variable and > there's nothing in it... and that's dumping it directly... no parsing, > nothing. >
Untrue. perl -Mwarnings -Mstrict -e 'our $VERSION = 1.2.3; warn unpack "C*", $VERSION'
Subject: Re: [rt.cpan.org #72111] version info created for invalid versions
Date: Wed, 2 Nov 2011 12:48:12 -0400
To: bug-Module-Metadata [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Wed, Nov 2, 2011 at 12:28 PM, rabbit@rabbit.us via RT <bug-Module-Metadata@rt.cpan.org> wrote: Show quoted text
>> It's not even valid data according to perl how can it be a valid v >> string. Perl doesn't recognize this as data. You dump the variable and >> there's nothing in it... and that's dumping it directly... no parsing, >> nothing. >>
> > Untrue. > > perl -Mwarnings -Mstrict -e 'our $VERSION = 1.2.3; warn unpack "C*", $VERSION'
Ditto. c.f. $ perl -MDevel::Peek -we 'our $VERSION=0.1.0; Dump $VERSION' SV = PVMG(0x11636f0) at 0x114bd50 REFCNT = 1 FLAGS = (RMG,POK,pPOK) IV = 0 NV = 0 PV = 0x113a950 "\0\1\0"\0 CUR = 3 LEN = 16 MAGIC = 0x1142bc0 MG_VIRTUAL = 0 MG_TYPE = PERL_MAGIC_vstring(V) MG_LEN = 5 MG_PTR = 0x114a890 "0.1.0"
Module::Metadata is indeed correct here. 0.1.0 is a valid v-string that normalizes to v0.1.0 (or 0.100_000 if you prefer float version numbers). Hence I'm closing this bug. Thanks. Vincent