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

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

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



Subject: Incorrectly reports version as 0 in some cases
A good example of this can be seen by running Module::Metadata->package_versions_from_directory against the contents of the AnyEvent 7.15 distro. It ends up reporting the version of AnyEvent::Log as "0" rather than undef. Internally, AnyEvent::Log has this (broken) $VERSION: our $VERSION = $AnyEvent::VERSION; Of course this is wrong, but I don't think reporting this as 0 is helpful. I'm not 100% sure why this is happening but I think it's because `version->parse(undef)` just treats this as 0. Ideally, I'd suggest that Module::Metadata short circuit when parsing gives an undef and not even create a version object, but that break backwards compatibility. Alternatively, you could add a new attribute to track whether the original version was undef and include that in the data structure returned by package_versions_from_directory.