Adam Kennedy wrote:
> This now means that installing modules from the tarball has a different
> result from installing the module from version control.
True, but if you install from version control, there's always the
possibility that you've modified the module. This makes it clear that
you haven't installed the official released version.
Or, you can Build distdir, cd into it, and install from there.
> And if anyone tries to take over your module, they download your tarball
> and put it into a new version control system, and now your Build.PL
> script doesn't work, because that nwe maintainer has to learn what your
> custom stuff does (which is non-trivial) and BY HAND change either the
> Build.PL or change the POD to the version in your repository they can't
> see.
>
> So, albeit in a different way to the way I suggested, this solution
> fails the maintainer test.
Well, if they don't have Module::Build::Dist installed, then everything
will work just like it was an ordinary module that didn't have any of
these fancy features (except for the message about installing
Module::Build::Dist). You'll have to update all these things by hand,
but you already have to do that if you're not using something like
Module::Build::Dist.
If they do have Module::Build::Dist installed, its docs should explain
what it does and what the various bits that it auto-updates should look
like.
> What if you your subclass needs to hook 5 different actions, and so on...
I'm just going to modify ACTION_distdir.
> You'll need to cut and paste this into every single Build.PL
>> use Module::Build;
>> eval 'use Module::Build::Dist;';
>> my $class = ($@ ? Module::Build->subclass(code => q{
>> sub ACTION_distdir {
>> print "You might want to install Module::Build::Dist\n";
>> (shift @_)->SUPER::ACTION_distdir(@_);
>> } })
>> : 'Module::Build::Dist'); # if we found it
>> my $builder = $class->new(...);
>> $builder->create_build_script();
True, but that's a one-time thing. After that, I just make it part of
my Module::Starter template for any new modules I create.
I think I see a division between stuff I want to happen at Build distdir
time (which really requires subclassing Module::Build) and things that
would be better handled by a separate release framework (like
Module::Release).
Module::Build::Dist:
Making the trivial changes outside of version control
that I've described here (VERSION sections & README)
Release framework:
Checking version control status
Running tests
Building tarball
Uploading
So I'm going to start work on converting the My_Build I attached before
into Module::Build::Dist. Are there objections to that name? Would
Module::Build::CJM be better?
--
Chris Madsen [EMAIL PROTECTED]
-------------------- http://www.cjmweb.net --------------------