On Fri, Oct 14, 2005 at 05:15:15PM +0200, Steven Schubiger wrote: > For those people, who haven't been luckily enough to have > experienced the beginnings of make2build, a short say: > > * It's a Makefile.PL -> Build.PL converter > * The conversion table is still lacking MakeMaker <-> M:B arguments > * It's still a script, that perhaps will be reworked in a modular manner > * Could use some opinions of the MakeMaker/M::B crowd > > http://search.cpan.org/~schubiger/make2build-0.19_01
(Slight problem. The script never gets written to blib and thus never gets installed. This is with Module::Build 0.2611.) This does the "override WriteMakefile" trick. Excellent! I was just wishing that existed the other day. Since this is the most accurate way involving the least duplication to maintain both a Makefile.PL and a Build.PL, I would recommend its inclusion into Module::Build. I would recommend a change in the way it works. Rather than spitting out a new Build.PL with static entries, the Build.PL should look something like this: # This does the trick of overriding WriteMakefile use Module::Build::Compat::Make2Build; do './Makefile.PL'; The advantages here are: * Any changes to the Makefile.PL are immediately reflected in the Build.PL * Any extra processing done in the Makefile.PL still happens when the user runs the Build.PL. This includes prompting the user for more information and any calculations necessary to determine the arguments to WriteMakefile(). In fact, the only things this approach can't potentially handle are overrides of MakeMaker methods. Nothing's going to handle that. And a final recommendation. Extend what the overriden WriteMakefile() can handle to accept Module::Build->new arguments directly. Since (nearly) all of WriteMakefile's arguments are upper-case, this is a simple matter of passing any lowercase arguments straight through. That way one can maintain a Makefile.PL while still taking advantage of some of Module::Build's features. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern You are wicked and wrong to have broken inside and peeked at the implementation and then relied upon it. -- tchrist in <[EMAIL PROTECTED]>