On Thu, Jun 3, 2010 at 3:38 PM, Seth Daniel
<perl-module-bu...@sethdaniel.org> wrote:
> I've been using Module::Build for several years.  Typically subclassing
> it to help build a module.  I read with interest David Golden's blog post
> about Dist::Zilla:
>  http://www.dagolden.com/index.php/752/why-im-using-distzilla/
>
> It sounds as if Dist::Zilla can be used as a replacement for
> Module::Build.  In other words it can help build a single module.  Since
> David is the maintainer of Module::Build and is obviously a fan of
> Dist::Zilla I was wondering on whether he would comment on the
> practicality of migrating from subclassing Module::Build to using
> Dist::Zilla.

It's a replacement in the narrow sense of *packaging* a distribution.
It doesn't replace Module;:Build (or ExtUtils;:MakeMaker) as an
install tool.  You still need a Build.PL or Makefile.PL in your
distribution.  However, if your Build.PL is pretty generic,
Dist::Zilla can generated a Build.PL for you.

If your M::B subclass is used for packaging, then Dist::Zilla may be
able to replace that functionality in a more extensible way. If your
subclass is used to customize the build or install process, then
you'll still need that.  (I believe that there was some recent work on
Dist::Zilla to allow you put your subclass into inc/ and tell
Dist::Zilla to use your subclass instead of Module::Build in the
generated Build.PL)

> In particular is it worthwhile for people who rarely need
> to interact with CPAN?  The code I write is almost entirely internal to
> the comapny where I work.  All of our modules are packaged and we don't
> currently publish anything to CPAN.  We find Module::Build adequate for
> both development installation and in our build system for running tests
> and creating packages (i.e. RPMs or debs).

I would say that if it works for you, you probably don't need to change.

Or, you may wish to use a subset of Dist::Zilla's features.  For
example, does your company mandate that all files have a copyright
statement on them?  If so, and if you don't want to keep them up to
date, you could use Dist::Zilla for that.

> On a somewhat related note is there anything out there that can help
> with the building of multiple modules?  Is Dist::Zilla good for this
> too?

As currently designed, I don't think it is.  You might want to talk to
some people who package Perl modules for Debian or FreeBSD as I think
they have tools for doing some work in batch.  Some of them hang out
in #toolchain on irc.perl.org.

>  I am particulary interested in anything that can take a list of
> module directories (e.g. Foo-A/, Foo-B/, Foo-B-Z/), run the tests, and,
> assuming everything is okay, come back with RPMs of said modules.  It
> would need to do this in the proper order (preferrably automatically
> discovering dependencies).  It seems I always have to build something to
> do this wherever I go and it gets tiresome.

You might want to look at PAR or FatPacker, but neither of those are
quite what you describe.

-- David

Reply via email to