Perl-Toolchain-Gang/Module-Build — comment on commit 886abd6b50511cc3183162817cae0fdfa18f060f
File:  line 0
By kenahoo:

On Sat, Feb 4, 2012 at 6:59 PM, David Golden <
reply@reply.github.com
> wrote:

> * In a configure/make/test/install cycle, I do think that most of the
> arguments should be given in the configure stage, even if they apply to
> later actions. E.g. you specify "-Dprefix" to a configuration script,
> which creates the Makefile, even though the prefix arg isn't used until
> "make install"
> * I'm not sure historically why it wasn't done that way in Module::Build
> and whether it was thoughtful design or just happenstance. CPAN.pm allows
> users to specify options at various stages (e.g. suggesting '--uninst=1'
> for an 'install' argument) so maybe that's why.
>

It was really just the general idea of config options that successively get
narrower in their scope. Something like having both a /etc/zshrc and a
$HOME/.zshrc . It's useful for something like 'Build test', where you may
want to run the 'test' phase many times with lots of different parameters
passed. It's also not too hard to imagine running 'Build install' several
times with different parameters each time, for instance if you're
installing from a mother machine to lots of daughter machines where the lib
directories are all on NFS mounts or something.

The only theoretical trouble with that (not considering whatever practical
troubles you seem to have here) is name collisions, but in practice that
seems not to be a big problem. What I really wanted to do was have very
tight parameter checking (something like Class::Container, which I am
extremely proud of but never really able to explain :-) but never did it.

-Ken