Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

comment on

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

I have to say that using v-string-like version "numbers" is wishful thinking not a "best practice". It might be a best practice in another few years. Right now, it is just asking for problems, many of which will be problems not for you but for the people who try to use your module and thus are the types of problems that it is even more important to avoid.

My suggestion to you is to upload version 0.0101 or 0.0104 or 0.0204 or 0.02004 or such of your module. Treating the purpose of the segments of your chosen version "number" too strictly is a mistake. You appear to be quite reluctant to increment the middle part of your version number; please don't be. What is important about version "numbers":

  • The sort order is obvious to both people and to programs
  • Two different versions must have different version numbers
  • Version numbers "increase"

Other considerations should be treated gingerly. I've seen tons of examples of people trying to assign meaning to certain aspects of version numbers that result in problems. For example, there is a CPAN module that tried to make the integer part of the version number match the release year. A minor "oops" followed by a too-hasty (IMHO) correction means that this module is now version

I've previous written versions as:

use vars qw( $VERSION ); $VERSION= 1.01_03;

But I worry that the "_" being there in the Perl source code but not there when you do:

print $My::Module::VERSION

could be a source for confusion that I can avoid (note that I don't consider using "our" to be a best practice either).

Version numbers like "1.2.3" are harder for computers to sort and are less clear how to handle in Perl. The advantages of "1.2.3" over 1.02003 are quite minor, as far as I can tell. So I much prefer version numbers be used that are trivial for both computers and people to sort and that are obviously just numbers (but sort correctly as strings as well) and so how to deal with them is obvious as well.

(No, I have not yet had a module make it to version I doubt I'll have this "problem" to address. Though, if I do, I might jump from 4.x to 500.x then from 699.x to 7000.x, etc. and just rename the module if I get close to version 999999.xx :)

Update: I forgot to mention to avoid trailing 0s on the latter parts of your version numbers. So if you go with x.yyzzz, then avoid (skip over) version numbers like 1.00012, 1.01010, 1.10020.

- tye        

In reply to Re: Can't use three part version number for CPAN modules (don't) by tye
in thread Can't use three part version number for CPAN modules by arc_of_descent

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 the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (8)
    As of 2021-01-20 14:30 GMT
    Find Nodes?
      Voting Booth?