On Sat, Apr 18, 2009 at 2:26 PM, Michael G Schwern <[email protected]> wrote:
> vX.Y    dotted pair?

vX.Y is a dotted pair, as per version.pm anyway.

> And how do you compare them all together?  You have to pull in a module just

At least it's a detail that toolchain developers need to know about
and hopefully can hide from end-users.  (Authors *ought* to know, but
it's clear they don't even read the docs of version.pm when they use
it.)

> Part of the point of META.yml is to make it easier to get metadata about a
> package.  No more scraping around in $VERSION or special parsing logic or
> guessing.  This reintroduces special parsing logic.  To this end, the META.yml
> version should be normalized to a simple decimal.  use version->numify.

That's not a good idea because it doesn't deal the wide variety of
distribution version schemes already on CPAN.  Like it or not, they
exist and we need to accommodate them.

Let's be very, very clear here.  There are *two* types of version
numbers that can show up in META.yml:

(1) Distribution version (the "version" key)

(2) Module version in the "provides" section.

(OK, technically, there are prereqs version numbers, but I'm talking
about numbers generated for the META.yml for the distribution
containing it.)

Distribution version numbers have absolutely no meaning except to
associate a META.yml with a file on CPAN:
PAUSEID/DISTNAME-VERSION.SUFFIX.  That's it.

My recommendation/assertion: The "version" key MUST match the VERSION
portion of the filename.  (And the "name" key MUST match the DISTNAME
portion of the filename.)

META.yml versions absolutely should not required to be normalized.
The cats are out of the bag, the barn doors are already open or pick
your metaphor, but crazy version numbers are already on CPAN and may
get bumped up in the future, so we want META.yml to accommodate them.

If someone specifies a crazy distribution version number to M::B and
wants the tarball created that way, then META.yml should reflect that.

However, I can see an argument that Module::Build (and other toolchain
tools) should numify version objects when *generating* a distribution
version based on a module version.  So that even if the
"dist_version_from" module uses qv("v1.2.3.4"), the distribution
version becomes 1.002003004.

-- David

Reply via email to