Elizabeth Mattijsen said:
> At 19:46 -0800 1/8/04, David Wheeler wrote:
>>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.
>
> I prefer the latter.

I do too, though Andy's point is well made.  I tend to think of the
distribution as a single entity rather than a collection of modules. 
Though provided each module has a version number I don't think there is a
problem.

>                       I have an update script that forces me to go
> through all of the module files of a distribution.  It forces me to
> check things whenever I start a new version.

Ooh.  Too much work!  Here's the relevant parts of a Makefile.PL showing
how I automate that.  Whenever I use an internal module I always specify
the version and that is automatically updated too, as is the version
number and date in the pod.  (This will probably get mangled by my mailer
- the real thing is on CPAN of course.)

use ExtUtils::Manifest "maniread";

my $Version      = "0.3206";
my $Date         = "8th January 2004";

my @files        = sort keys %{maniread()};
my @versions     = grep { $_ ne "Makefile.PL" } @files;

sub MY::postamble
{
    qq[
SET_VERSION = \$(PERL) -pi.version \\
    -e 's/(^\\s*(?:our\\s+)\\\$\$VERSION =
")\\d+\\.\\d+(";)/\$\${1}$Version\$\$2/;' \\
    -e 's/(Version )\\d+\\.\\d+( - ).*/\$\${1}$Version\$\${2}$Date/;' \\
    -e 's/(Devel::Cover Version )\\d+\\.\\d+/\$\${1}$Version/;' \\
    -e 's/(\\buse Devel::Cover(?:::\\w+)*\\s+)\\d+\\.\\d+/\$\${1}$Version/;'

@versions : Makefile.PL
\t \$(SET_VERSION) @versions
}


>>So, what do people like or prefer, and why? Is there a consensus on
>>this? If so, what is it?
>
> I don't think there is a consensus.  ;-)

Vive la Difference!

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

Reply via email to