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

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

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



Subject: Incorrectly reports derived version as 0
If I use Module::Metadata (1.000037) to get the version of the (for example) CPANPLUS::Configure package, it returns 0. perl -M5.14.2 -MModule::Metadata -e 'my $info = Module::Metadata->new_from_file("/usr/local/perl-5.14.2_64_8/lib/5.14.2/CPANPLUS/Configure.pm"); say $info->version' CPANPLUS::Configure requires CPANPLUS::Internals and derives its version from there package CPANPLUS::Configure; ... require CPANPLUS::Internals; $VERSION = $CPANPLUS::Internals::VERSION = $CPANPLUS::Internals::VERSION; ... package CPANPLUS::Internals; ... $VERSION = "0.9103"; ... I would expect to get the version "0.9103" or at least some feedback that derived versions are not resolved!
On 2019-10-20 23:56:49, SVW wrote: Show quoted text
> > If I use Module::Metadata (1.000037) to get the version of the (for > example) CPANPLUS::Configure package, it returns 0.
Looks like it works: perl -MModule::Metadata -e 'my $info = Module::Metadata->new_from_file(q{/Users/ether/.perlbrew/libs/26.3@std/lib/perl5/CPANPLUS/Configure.pm}); print $info->version' 0.9906
On 2019-10-21 01:56:49, SVW wrote: Show quoted text
> > If I use Module::Metadata (1.000037) to get the version of the (for > example) CPANPLUS::Configure package, it returns 0. > > perl -M5.14.2 -MModule::Metadata -e 'my $info = Module::Metadata-
> >new_from_file("/usr/local/perl-
> 5.14.2_64_8/lib/5.14.2/CPANPLUS/Configure.pm"); say $info->version' > > CPANPLUS::Configure requires CPANPLUS::Internals and derives its > version from there > > package CPANPLUS::Configure; > ... > require CPANPLUS::Internals; > $VERSION = $CPANPLUS::Internals::VERSION = > $CPANPLUS::Internals::VERSION; > ... > > package CPANPLUS::Internals; > ... > $VERSION = "0.9103"; > ... > > I would expect to get the version "0.9103" or at least some feedback > that derived versions are not resolved!
This looks like a dupe of https://rt.cpan.org/Ticket/Display.html?id=130155 or at least very closely related.
On 2020-05-12 12:05:11, DROLSKY wrote: Show quoted text
> On 2019-10-21 01:56:49, SVW wrote:
> > > > If I use Module::Metadata (1.000037) to get the version of the (for > > example) CPANPLUS::Configure package, it returns 0. > > > > perl -M5.14.2 -MModule::Metadata -e 'my $info = Module::Metadata-
> > > new_from_file("/usr/local/perl-
> > 5.14.2_64_8/lib/5.14.2/CPANPLUS/Configure.pm"); say $info->version' > > > > CPANPLUS::Configure requires CPANPLUS::Internals and derives its > > version from there > > > > package CPANPLUS::Configure; > > ... > > require CPANPLUS::Internals; > > $VERSION = $CPANPLUS::Internals::VERSION = > > $CPANPLUS::Internals::VERSION; > > ... > > > > package CPANPLUS::Internals; > > ... > > $VERSION = "0.9103"; > > ... > > > > I would expect to get the version "0.9103" or at least some feedback > > that derived versions are not resolved!
> > This looks like a dupe of > https://rt.cpan.org/Ticket/Display.html?id=130155 or at least very > closely related.
It's another example of a module uses multiple lines of code to determine its $VERSION, which is not something that Module::Metadata supports. Nevertheless, it looks like CPANPLUS::Configure has changed its declaration, so this is no longer an issue in this case.