Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Don't use version.pm and don't listen to Perl Best Practices on this one. This is a classic example of somebody writing up a recommendation on something brand new (the author's own creation). A few months of experience showed problems with the idea, but it isn't like the book is going to be republished to discuss those. Make your version numbers very simple, values that can be interpreted as numbers and that always sort the same whether treated as numbers or as strings. Avoid trying to assign meaning to your version strings or parts of them. So I just always follow Perl's lead and use 1.001_001 forms of version numbers. Though I avoid Perl's idea of assigning meaning to whether or not the middle part is odd or even. I also skip multiples of 10 for the 2nd and 3rd parts and don't let the third part go above 99. If the 2nd part goes above 99, then I skip to 111 to avoid the second digit being 0. This is so the break-up is obvious even when the '_' is not present because you are seeing just the numeric value. If you expect to get past version 9, then you should start with version 10 so you can avoid string sorting breaking down when you go from 9.x to 10.x. Set you version number very simply such as via:
so all of the different things that try to introspect for your version number without running your code have no problems. - tye In reply to Re: Module version numbers best practice (KISS)
by tye
|
|