As an aside, the v-string literal in Perl doesn't like leading zeros; e.g. v0.09 thinks that the 09 part is octal! Since the comparisons of v-strings work part-wise, there is no longer a need to call it 09 just so it sorts less than 10.

A while back I wrote a compare function that took all kinds of stuff in a version string, and compared each part according to what it looked like. So you could have '3.0b' for example. But using v-strings throughout Perl for $VERSION etc., we need to stick with plain numbers.

As for different ideas, here at work we have a major release called an "Iteration" and within that possibly more "Revisions". Once we had a patch, so that gives three numbers: i3r1p2, for example. Or v3.1.2 to use more standard forms.

In some of my C++ freeware, I have versions released as formal releases called "Public Build", so you have for example pb5. No subversions or anything--each time the formal release process is performed, the number is incremented. That's simpler than keeping track of various levels and what they mean, isn't it?

For continuing work, I use a trailing + symbol. So version pb5+3 is three informal releases beyond pb5. If I wanted to note individual builds, that could be a third number.

So what that boils down to is that the internal releases are a deeper number than the formal releases, as opposed to using odd/even or different ranges. Logically, it amounts to the same thing: formal release further increases the number, new development increases that, and you can tell whether a version is formal or internal if you know that only certain numbers can be formal because they are snapped to a grid, so to speak.

I think that's the fundimental concept set that works for lots of people.

You should also work within people's intuition that changes to less-significant positions means less significant changes.

For my backup utility script, I don't distinguish between formal and internal work. It's small and simple so I generally don't stop until it's stable again.

I suppose a status indicator near the $VERSION indicator would be a OK idea, in general. State whether it's formal, beta, private, etc.

—John


In reply to Re: Handling version numbers by John M. Dlugosz
in thread Handling version numbers by djw

Title:
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, details, 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, summary, 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.