On Sat, Dec 4, 2010 at 4:35 AM, Octavian Rasnita <orasn...@gmail.com> wrote: > Is there a module you recommend for creating CPAN packages? > > Module::Build, Module::Install, ExtUtils::MakeMaker, Dist::Zilla, another one? > > Is one of them more compatible with CPAN, CPANPLUS, App::cpanminus, or better > maintained, prefered for the future?
All of the module builders you list are compatible with all the CPAN clients you list. None of them are "best" but they offer different tradeoffs. Here is my take: ExtUtils::MakeMaker -- this is the "standard" but it is annoying to work with and tricky to customize (unless you are a Makefile expert). Prolific CPAN authors seem to prefer Module::Install or Dist::Zilla to avoid dealing with EU::MM directly. Module::Build -- this is the 'pure perl' alternative. It is very easy to customize compared to EU::MM but you can't rely on users having a new enough Module::Build for any given feature unless you target Perl 5.10.1 (which added the ability for CPAN/CPANPLUS to bootstrap tools you need *before* running Build.PL) Module::Install -- this gives a nicer API than EU::MM, but it uses EU::MM behind the scenes to do the work. It is different in that it bundles itself with the distribution, avoiding bootstrap problems. This is viewed as a benefit by some and as a burden or design defect by others. If existing M::I plugins don't meet your needs, it is a bit harder to understand how to customize M::I compared to M::B. Dist::Zilla -- this is a complete distribution management tool, not just a builder. It tries to let authors write as little repetitive scaffolding and documentation as possible and then generates a "release ready" distribution from templates and other configuration. Think of it as a "distribution compiler". In the generation process, it will create your Makefile.PL (EU::MM) or your Build.PL (M::B) for you. Your question was about "creating CPAN packages". All four will let you "create" a distribution tarball. For the first three, you have to create a Makefile.PL or Build.PL and then use the tool you select to create the tarball. With Dist::Zilla, you create a "dist.ini" file and Dist::Zilla creates the tarball itself (generating the Makefile.PL or Build.PL) without relying on EU::MM or M::B to do the work. Dist::Zilla also can create a new "boilerplate" distribution, similar to Module::Starter or h2xs. The other three do not. I have switched to Dist::Zilla and many other prolific CPAN authors have as well. (It was written by RJBS, the most prolific CPAN author of all, so he has some perspective on what's the easiest thing for managing CPAN distributions). If you are interested in learning Dist::Zilla, the online tutorial is the way to go: http://dzil.org/tutorial/start.html If you don't want a complete solution, the question is how much customization do you need (to the test process, distribution packaging process, etc.)? If the answer is "a lot", then I would recommend M::B. If the answer is "very little", then I would recommend M::I. Avoid direct EU::MM entirely. I hope that helps. (I hope users of other tools find my descriptions relatively objective. My apologies for any excessive bias.) Regards, David