SPUG: version numbers and MakeMaker
tyemq at cpan.org
Fri Jan 30 21:07:02 PST 2009
On Fri, Jan 30, 2009 at 2:58 PM, Ryan Corder <ryanc at greengrey.org> wrote:
> On Fri, Jan 30, 2009 at 02:01:37PM -0800, Joshua ben Jore wrote:
> | FWIW, you never want to use multi-dot version numbers in perl. It's
> | possible and version.pm goes to some effort to heal the past but
> | there's no point in re-inventing badness.
> use version; our $VERSION = qv("0.1.2");
> Damian Conway goes into detail on why you need to do it this way and why it
> needs to be on one line in chapter 17 of /Perl Best Practices/. I just
> the chapter last night, otherwise I wouldn't be replying to this thread :)
I takes a special level of hubris to write a brand new module and
simultaneously loudly declare it to be a 'best practice'. But Damian has
that level of hubris. And several of these modules that he produced along
with that book have already become official deprecated.
There are problems with version.pm and Josh is right to discourage one from
using it to make multi-dot version numbers. He even already mentioned
version.pm and noted that it /tries/ to fix the problems.
One shouldn't be surprised that Perl Best Practices doesn't mention the
problems with version.pm, since version.pm didn't exist before the book was
written (which is exactly why one shouldn't declare a "best practice" until
enough time and usage has passed for the problems with it to become
For example, check the reviews of version.pm (
http://cpanratings.perl.org/dist/version). A review that gave the module 5
stars still noted:
"Unfortunately, because of the pest that are X.Y.Z versions, version.pm by
definition can't make comparisons work well in all cases"
And it isn't hard to find reports of problems with version.pm. It is easy
to try to deal with versions in a way that doesn't work perfectly with
version.pm. Lots of key tools had to be changed in order to properly deal
with the versions produced by version.pm. Which means there is still the
risk of running into tools that have such problems.
Please, just say "no" to multi-dot version numbers.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the spug-list