Perl build systems

Matts on 2002-01-14T10:37:54

Has anyone used perl based build systems, like Module::Build, and if so would they like to comment on the usefulness of this? I'm thinking that a program that can just ship a ./install might be better than the whole perl Makefile.PL, make, make test, make install cycle.

I've heard of Cons, and also of Module::Build, which looks interesting (if a little incomplete). So what's your experience with these? Too much of a chicken and egg situation (i.e. you have to install them to install your module)? Or perfectly good for the job?


Ask Ingy

hfb on 2002-01-14T14:57:27

Build systems are usually so customised as to be impossible to please many people with them as it always seems like the engineer contrived a problem to fit the solution they so cleverly created. You might ask Ingerson about a thing he's working on in a similar vein that seems like it has promise but the social engineering part of it will be the most challenging.

cons

gnat on 2002-01-14T16:27:06

cons is the granddaddy, and is so good that Python's much vaunted Software Carpentry Project (build TOP-NOTCH software development tools in Python!) could do no better than to reimplement cons in Python. Because, well, apparently they have a lot of time to waste in language bigotry.

Damn shame that Parrot's going to remove the need for their work.

Anyway, cons is the mature product and while I've heard good things about it, I've never used it. Hope the scuttlebutt helps :-)

--Nat

Cons & Module::Build

autarch on 2002-01-14T16:44:08

I've looked at cons several times, but AFAICT its really oriented towards being an even more powerful, customizable version of make. It seems to be very much oriented towards compiled code (C, C++, and maybe Java) and there's nothing in the docs about using it for Perl-based stuff.

I've been helping Ken a bit with Module::Build and playing with it for some projects. Its really easy to use and right now does most of the basic stuff ExtUtils::MakeMaker does, except that its way easier to customize.

I'm going to switch Alazbo to Module::Build pretty soon because Alzabo has a pretty involved build process involving installing modules, copying Mason components, generating an Alzabo::Config module, and creating some directories for storing Alzabo objects. All of this will be much easier and less code with Module::Build.

D'oh moment

Matts on 2002-01-14T19:30:20

I realised one thing:

In a complex module with prerequisites, you can't do away with "make" unless you can convince all the other developers to do away with make too.

So the advantage seems to be as autarch said - easy to alter build processes, not necessarily doing away with make.

(one thing I'd like to be able to do is stick XS files in lib/path/to/module, rather than in the root directory, but that seems impossible with ExtUtils::MakeMaker, unless I'm doing a Homer).