Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

The time has come to publish a module on CPAN (hurrah!) and in cleaning up the code in advance of publication the need has arisen to choose a version number system. Unfortunately the documentation which I have found (much of which is well out of date) is unclear and/or contradictory so I humbly ask for your thoughts and advice.

The documentation for version suggests that there are only two options, the dotted decimal (1.23) and the v-string (v1.2.3). I would like my module to be useful to the widest extent and this prejudices me against the latter because it requires another non-core dependency in pre-5.10 versions of perl. Of course this is a minor point but if there's no real advantage to v-strings why make extra work?

The older docs here at PM such as Simple Module Tutorial seem to be happy with dotted decimal (but see the first subthread for discussion on this). The (slightly) more recent José's Guide for creating Perl modules is equally happy with it and describes the traditional 1.23_45 format for dev releases which seems to me to be both widespread and sensible.

So, the question is this. Is there anything inherently problematic with dotted decimal either now or that could be reasonably foreseen? Thanks for any advice you can give.

Hippo


Update and Summary

Thanks to everyone who responded - your advice is much appreciated. There seem to be reasonable levels of support for both date-based versions and traditional dotted-decimal and some lesser support for v-strings.

I've decided to go for dotted-decimal in this particular case for reasons of simplicity, backwards compatibility and legibility. The expectation (rightly or wrongly) is that development of the module won't be rapid so two digits will suffice for minor versions (eg. 1.01_01) which I think is the best compromise in the circumstances.

Finally, thanks to admiral_grinder who makes an excellent point. I too have been caught out by this in third-party bundles in the past and will therefore strive to avoid such confusion in my own code.


In reply to Module version numbers best practice by hippo

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-03-29 07:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found