develooper Front page | perl.module-authors | Postings from May 2009

Dual-Build Modules (What to do if both Makefile.PL and Build.PL exist)

Thread Next
From:
Jonathan Yu
Date:
May 5, 2009 19:07
Subject:
Dual-Build Modules (What to do if both Makefile.PL and Build.PL exist)
Message ID:
d1b732a70905051906m5de494c2lf4c900846deab44@mail.gmail.com
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

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About