Module versions in multi-module distributions
If a distribution contains multiple modules, how should VERSION be set in each module?
There are a number of options:
- Every module has the same version number, and it's the version number of the dist.
- Each module has its own version number. The version number of the dist might be different from all of them, or it might be take from the lead module, if there's an obvious one.
- The lead module has a version number defined, but none of the other modules have a version defined.
The first option makes most sense to me, and until recently I thought it was the approach most people follow. Sure, it's a pain updating version number in every module for every release, but Dist::Zilla (and other tools?) can handle this for you automatically.
I can see at least one problem with the second option: you might be using one module from the distribution, and keeping an eye on the latest version, perhaps via MetaCPAN. A new version of the distribution might be released, with the module you use unchanged, but with changes (eg bug fixes) in other modules, which are used by the one you use.
The problem I see with the third approach is that you might only be interested in one module, but you can't just track whether you've got the latest version of that.
Ok, there are a number of ways you can map a module to distribution, and then just check that you've the latest version of a distribution.
I'm just curious: what are other pros and cons for each approach (and others I've missed?), and the reasons why people pick one approach over the others?