perlquestion
ig
<p>I would like to know current recommendations and the advantages and disadvantages of the various module version numbering schemes.</p>
<p>I have read [mod://version], [id://743894], [id://690906], [id://396348], [id://520850], [id://417576] and various other discussions.</p>
<p>The [mod://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 [mod://version] is not preferred.</p>
<p>Most of the core modules and module templates created by Module::Starter have $VERSION set similarly to the following:</p>
<c>
our $VERSION = '1.17';
</c>
<p>For new modules:</p>
<ul>
<li>Should I use [mod://version]?</li>
<li>Should I use extended or numeric versions?</li>
<li>Should numeric versions have multiples of three digits after the decimal point?</li>
<li>Should $VERSION be set within a BEGIN block?</li>
</ul>
<p>About the only thing that seems reasonably certain is that I shouldn't use v-strings.</p>
<p><b>update:</b> 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 [mod://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 [mod://version] at least, and any other modules that replace UNIVERSAL::VERSION.</p>
<p><b>update:</b> John Peacock is evolving the version.pm module for the upcoming perl 5.10.1 release. David Golden has [http://perl-qa.hexten.net/wiki/index.php/Version_POD|updated (work in progress) documentation for the upcoming release], there is an [http://www.annocpan.org/~JPEACOCK/version-0.76_03/lib/version/Internals.pod|(older) annotated copy of the version POD] with some helpful comments and there is some [http://www.nntp.perl.org/group/perl.perl5.porters/2009/07/msg148667.html|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.</p>
<p><b>update:</b> See also [http://www.nntp.perl.org/group/perl.perl5.porters/2009/07/msg148977.html|A modest proposal] on P5P, started by John Peacock.</p>
<p><b>update:</b> [http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/]</p>