|laziness, impatience, and hubris|
module version numbersby ig (Vicar)
|on Jul 15, 2009 at 11:59 UTC||Need Help??|
ig has asked for the
wisdom of the Perl Monks concerning the following question:
I would like to know current recommendations and the advantages and disadvantages of the various module version numbering schemes.
I have read version, problem incrementing module version number, module version convention, Re: Versioning modules in a package, Can't use three part version number for CPAN modules, Seeking thoughts on version numbers in modules and various other discussions.
The version documentation has some best practice guidance and suggests that extended versions will become preferred with Perl 5.10.0, but looking at the core modules in current blead suggests otherwise and that version is not preferred.
Most of the core modules and module templates created by Module::Starter have $VERSION set similarly to the following:
For new modules:
About the only thing that seems reasonably certain is that I shouldn't use v-strings.
update: UNIVERSAL::VERSION, by default, compares versions when a module version is specified in a use statement. But it's documentation doesn't say much about how it does comparison. The version modules replaced UNIVERSAL::VERSION, presumably to provide different behavior. It would be good to know what is compatible with the various (at least the common) implementations, across different versions of perl and version at least, and any other modules that replace UNIVERSAL::VERSION.
update: John Peacock is evolving the version.pm module for the upcoming perl 5.10.1 release. David Golden has updated (work in progress) documentation for the upcoming release, there is an (older) annotated copy of the version POD with some helpful comments and there is some relevant discussion on P5P list. I guess this is as current information as one can hope to find and from a group that is as in-the-know as one could hope.
update: See also A modest proposal on P5P, started by John Peacock.