On Thu, Jan 08, 2004 at 07:46:04PM -0800, David Wheeler wrote:
> Hi All,
> 
> What's the consensus on the version numbers to give to different 
> modules in a CPAN distribution? I've traditionally only incremented the 
> main module in a distribution and any modules that have been changed 
> since the last release. But this means that I have modules in a single 
> distribution with different version numbers. Other CPAN authors have 
> omitted version numbers from all but the module that names the 
> distribution. Still others have made all of the modules in a single 
> distribution have the same version number.
> 
> So, what do people like or prefer, and why? Is there a consensus on 
> this? If so, what is it?

I can't comment on consensus, but I think that for clients of the module, what
they really want to know is the module number as found on CPAN.  Even if
inidividual files have not changed, as they're part of one package, they
likely interoperate and so their behaviour will change anyway.

To achieve this, I export $VERSION from the "main" module (the one named in
Makefile.PL to retrieve the version from), and import it in the remaining
modules.  It'll break if the module is installed by hand in parts, but then I
figure that if you do that, you're on your own anyway.  For the rest of the
time, it works nicely to ensure that I don't get caught out by forgetting to
update the numbers in individual files.

Mx.

Reply via email to