develooper Front page | perl.makemaker | Postings from April 2002

Re: Module::Build design plans

Thread Previous | Thread Next
Michael G Schwern
April 28, 2002 10:12
Re: Module::Build design plans
Message ID:
On Sun, Apr 28, 2002 at 03:43:30PM +1000, Ken Williams wrote:
> I'm thinking of creating meta-data files for Perl modules, 
> similar to Fink's .info files.  The first step in the build 
> process (similar to "perl Makefile.PL") would read this file and 
> configure itself appropriately.  This file would NOT contain 
> Perl code to be evaluated, since this opens up the possibilities 
> of dynamically-determined dependencies.  It would just be a 
> "flat" configuration file.  I haven't decided on a format for 
> the file yet, but options might be Fink's format, YAML [1], XML 
> (shudder), or something else.

This is what Andreas and I talked about at the first YAPC::Europe in London
and its the best way to go.  There's the obvious benefits you've pointed out
above, as well as somewhat less obvious security benefits.  ie. you don't
have to run a lump of untrusted Perl code just to find out if you'd like to
download a module.

YAML's as good a choice as any.  Easy to write, easy to parse.

If may not be possible to get all the possible configuration problems down
to just a static config file.  You'll likely still need the ability for
modules to call perl code for various stages of the build & installation. A
good exercise would be to take something really complicated, like PDL or
WxPerl and think "how would I do this in Module::Build"?

> What other things need to be in the info-files?  Module 
> (distribution) name should be there, but version should probably 
> not be (they're specified in the module files themselves).  
> Patches aren't relevant, of course.

I'd just emulate the current Version or Version_From scheme. (ie. version in
the config file or parse it from another file).

In addition to fink's format, you might want to look at dpkg.  Debian has
solved a lot of the edge case problems which face a packaging tool.


Michael G. Schwern   <>
Perl Quality Assurance	    <>	       Kwalitee Is Job One
Good tidings, my native American Indian friend!  America will soon again
be yours!  Please accept 5th Avenue as an initial return!

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About