The way I've interpreted that in my own auto-build scripting is that if Build.PL exists, the module author is probably a Module::Build user who is only providing a Makefile.PL grudgingly for the sake of those who haven't installed Module::Build, and thus I figure that if there's any difference between the two .PL files, probably Build.PL is the one the author is more invested in.
On Tue, May 5, 2009 at 7:06 PM, Jonathan Yu <jonathan.i...@gmail.com> wrote: > Hi wise Perl authors: > > I've been building some Perl packages for Debian. I've noticed in the > course of this that dh-make-perl (our preferred script for > transforming Perl distributions into Debian packages) prefers > Makefile.PL over Build.PL. > > One problem this has caused is that a Makefile is created which is not > removed when 'perl Build clean' is run. Now, Makefile.PL via > Module::Build::Compat actually runs Build.PL the first time, so the > Makefile expects 'Build' to already exist. The next time the module is > built, 'make' is run, which in turn triggers 'perl Build', but this no > longer works since Build.PL has not been run yet (so there is no > Build). > > The real question at hand here is: for modules that provide both a > Makefile.PL and Build.PL, which should be preferred? More than that, > from the perspective of CPAN authors, is it even useful to provide > both? Now that Module::Build is a core module, maybe only a Build.PL > should be included. > > Add to this some complication from Module::Install, which also uses > Makefile.PL. So in that case maybe Makefile.PL is preferred (for > Module::Install to do its thing) rather than Build.PL. (On the other > hand, I don't think I've seen modules that mix both M::I and M::B, so > in the wild this will probably not be a problem) > > What does everyone else think? > > I look forward to reading what other authors have to say about this. > > Cheers, > > Jonathan > -- Check out my LEGO blog at http://www.brickpile.com/ View my photos at http://flickr.com/photos/billward/ Follow me at http://twitter.com/williamward