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

CPAN.pm users generally expect to set makepl_arg and buildpl_arg and for that to work.

Before I wrote local::lib this was the standard approach and the general irc.perl.org community advice to people with problems was ".modulebuildrc's precedence is useless if you want to pass other options, if you see one delete it".

Once I wrote local::lib and we used .modulebuildrc the general community advice became ".modulebuildrc's precedence is useless, you'll need to unconfigure everything in CPAN.pm to use it"

No way out is NOT a dramatization, "'PERL_MB_OPT= Build install'" without supply that environment variable to anything else is not something current installers support. If I'm going to have to have to teach a user how to go into the build directory and mess about by hand, it's going to be faster for me to supply them with a faked up Makefile.PL since ExtUtils::MakeMaker is so much saner here.

And now I'm calling MakeMaker sane. That's how bad this is.

As a naive user, I would expect the precedence order to be:

.modulebuildrc supplied info
PERL_MB_OPT supplied info
things I passed when calling Build.PL
things I passed when calling ./Build action_name

As an expert user, I would expect exactly the same thing, except that when it doesn't work I know how to switch the distribution back to a Makefile.PL which at least sucks in consistent, well known, unixy ways.

The current state is a complete mess, and worse still is a mess that blocks other implementations of the Build.PL API from having sane code because of the expectation of at least some degree of bugwards compatibility with the current Module::Build codebase.

The answer to this is not to document the incomprehensible disaster we currently have, it's to fix the problem. Module::Build has not been afraid of breaking compatibility in the past, and those authors (myself included) who care about compatibility migrated away years ago. Since the damage from incompatibility has already been done, let's please not use it as an excuse not to improve the state of the art not only for current Module::Build users but for all future Build.PL implementors and downstream users as well.