FAQ

On 3/7/2011 1:34 PM, John M. Gamble wrote:
Well ... this raises a question. Whither Module::Build?

Is its future simply to be the precursor to Dist::Zilla? Or to be wrapped
up as a Dist::Zilla::Simple?
First, a little background. The makefile created by ExtUtils::MakeMaker
contains a number of targets that can be classified into 2 categories.
First, there are the ones used by people installing modules from CPAN:
primarily "make && make test && make install". We can call this the
"installing" role.

Second, there are the targets used only by people writing modules, like
"make dist", "make manifest", generating META.yml (and now META.json).
We can call this the "authoring" role.

When Module::Build was conceived as a pure-Perl MakeMaker replacement,
it also implemented both roles. But if you think about it, there's no
particular reason that the same tool has to fill both roles, and good
reasons why there should be a separate tool for each role.

A tool implementing the "installing" role has to have minimal
requirements, because they'll have to be installed on every system that
uses a module that uses that installer. It needs to be able to run on
pretty much every system that can run Perl, including systems that only
have older versions of Perl. It needs to be as bulletproof as possible,
because it'll be used by people who are just starting to learn Perl.

An "authoring" tool, on the other hand, will only be used by people who
are writing modules. As a result, it can assume a greater familiarity
with Perl. It can have heavy prerequisites, like Moose, which makes it
easier to implement more complex features, like rewriting POD, version
control integration, uploading to CPAN, etc.

Dist::Zilla is the first attempt to separate the authoring role from the
installing role that's achieved significant traction. As such, it will
never replace the "installing" side of MakeMaker or MB. There's been
some talk about an "Install::Zilla" to implement the installing role,
but AFAIK nobody's started working on that yet.


I'd like to see MB work towards separating the two roles internally,
with the goal of developing an install-only tool. Here's a possible
scenario:

Module-Installer would be a new dist containing the "installing" parts
of MB. Ideally, you could convert a Build.PL to use Module::Installer
by just doing s/Module::Build/Module::Installer/g.

Module-Build would become a legacy dist containing the "authoring" parts
of MB for backwards compatibility. It would depend on
Module::Installer; Module::Build would become just an empty subclass of
Module::Installer.

If people want to continue developing the authoring side of MB, it could
become a third distribution, say Dist-Builder. The reason for a new
dist would be to allow it to gain prerequisites without influencing
modules that are depending on MB for its installing role.

--
Chris Madsen perl@cjmweb.net
-------------------- http://www.cjmweb.net --------------------

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 8 of 14 | next ›
Discussion Overview
groupmodule-build @
categoriesperl
postedMar 5, '11 at 8:46p
activeMar 14, '11 at 1:38p
posts14
users9
websitecpan.org...

People

Translate

site design / logo © 2017 Grokbase