Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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:

our $VERSION = '1.17';

For new modules:

  • Should I use version?
  • Should I use extended or numeric versions?
  • Should numeric versions have multiples of three digits after the decimal point?
  • Should $VERSION be set within a BEGIN block?

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 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.


In reply to module version numbers by ig

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (4)
    As of 2018-03-20 01:05 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (247 votes). Check out past polls.