Reputation: 318
I'm writing a programmer's text editor (yes another one) in Perl called Kephra, which is also a CPAN module of course and bundled with Module::Install. Recently I saw that Module::Build has gone into core, so if I switch I could reduce dependencies. Is there any other reason to switch?
Upvotes: 8
Views: 1438
Reputation: 22570
The cud as already been chewed a bit on this before in "Which framework should I use to write modules?"
After spitting out the cud I decided to go with Module::Build but clearly different answers are possible! (though I've been happy with M::B so far).
Upvotes: 5
Reputation: 110509
We use Module::Build in our group.
The main reason is Easy Extensibility.
Module::Build allows you to do more with your build process in pure Perl through subclassing. If you want to do more using Module::Install, you have to have knowledge of how Makefiles work, AFAIK. Since you presumably already know Perl, this can be an advantage.
As you said, using Module::Build removes the dependency on an external make
program, which can be viewed as a good thing.
However, the main cons that I can think of are:
perl Makemaker.PL; make; make install
paradigm, and can be thrown off by having Build.PL
instead. Hopefully this isn't a big deal.All that said, though, I still recommend Module::Build simply for the extensibility. If that's not an issue for you, you may be better off sticking with Module::Install.
Upvotes: 6
Reputation: 13353
Well, Module::Build
is a pretty good module, it's supposed to be a drop in replacement for ExtUtils::MakeMaker
, that is, replace the Makefile.PL by a Build.PL, which generate a Build instead of a Makefile. It was also meant as "simple things should stay simple, hard things should be possible".
Module::Install
takes a different approach and generates a Makefile.
Also, don't forget that not everyone runs the latest version of everything :-)
I don't remember any comparison of those modules, but I think you could find a few things from Module::Build
and Module::Install
respective cpanratings pages.
Upvotes: 5