MakeMaker needs a way to allow folks to customize the META.yml.  Right now
there's only the undocumented EXTRA_META parameter which just appends it's
argument onto the default META.yml.  This is undesirable because A) the user
has to write YAML (and possibly screw it up) and B) it doesn't allow one to
override the default META.yml, just add to it.

Getting the customizable META.yml stuff straightened out is particularly
important because it will enable "configure_requires" [1] which will finally
allow authors to, for example, require an updated MakeMaker.  It also means
that every time the META.yml spec adds something I don't have to go change
MakeMaker.

Module::Build accomplishes this with "meta_merge" and "meta_add" arguments.
They take a hash and merge with or overwrite the values in the existing hash.
 This should be adequate.

I'm toying with a 3rd option, "meta_modify".  It takes a subroutine to which
it hands a reference to the meta hash.  The subroutine is free to alter the
hash as it wishes.  I feel this may be a bit YAGNI but it is easy to implement.

One consideration is how the META.yml dependency system interacts with
MakeMaker's own.  If someone wants to declare a "build_requires" does
MakeMaker need to know about it or is it enough that it's in the META.yml?  If
MM does need to know, is it enough to just read this information out of the
meta hash so we don't have to declare a bunch of new MM parameters?

The other consideration is how to go from the hash to YAML.  Right now MM
generates its YAML by hand and is very specific to the little bit of YAML that
MM needs.  One simple solution is to just ship YAML::Tiny with MakeMaker.  I'm
partial to that, we already have the system in place to do it.  This neatly
side-steps the mess of detecting if there's a YAML module installed and which
one it is and how to talk to it and what to do if there isn't a YAML module.


[1]  I worked with Jos to make a CPANPLUS patch to support it.  There's an
interesting possibility to have MakeMaker automatically set configure_requires
for itself based on what arguments were passed in.  For example, if LICENSE is
used, then it would require MakeMaker 6.31.


-- 
Don't try the paranormal until you know what's normal.
        -- "Lords and Ladies" by Terry Prachett

Reply via email to