David Golden wrote:
> On Thu, Apr 16, 2009 at 10:18 AM, Jonathan Yu <[email protected]> wrote:
>> When the version pragma is used, META.yml creates files which have a
>> stringification of the $VERSION. This causes problems if version
>> objects are used, since the object becomes stringified as a v-string,
>> like: "v1.1" vs the "1.001" format that CPAN expects.
> 
> There's absolutely nothing wrong with "v1.1".  PAUSE/CPAN handle that
> just fine.  It might not be the best way to do it, but once that style
> got out into the wild, the tools adapted.

Let's count the different ways we might have to parse a version.

X       ok, sort it as a number.
X.Y     hopefully that's a decimal number and not a dotted pair
X.Y_Z   oh right, alpha versions.  Strip _Z off and sort as X.Y
X.Y.Z   dotted triad.  split and compare X, Y and Z individually
vX.Y    dotted pair?

And how do you compare them all together?  You have to pull in a module just
to compare versions, if you're aware it exists or that all of the above even
exists.  And if I'm dealing with Perl versions, but in another language (say,
a packaging system) I have to add all these exceptions myself.  Oh, and know
the exist.  Do we even write this down?

Gentlemen, this is insanity.  Its way too much work for no tangible gain.  I
have had to work with this sort of insanity before, Redhat packages didn't
have a normalized versioning system.  You might have 5.8 mixed with
6.7.2a-alpha.  Good luck.

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.


-- 
Being faith-based doesn't trump reality.
        -- Bruce Sterling

Reply via email to