What if the Build.PL which gets shipped with the tarball is
autogenerated from some kind of "modern"[1] input specification?
In other words, "what you have to type" in *your* Build.PL is not
dictated by backwards compatibility and certain things can be implied
or set automatically if the *deployed* Build.PL can be autogenerated.
Thus, whatever ugly bits might be required for compatibility don't have
to be hand-written (and documented (and then explained (and, of course,
still not quite understood by all.)))
That is, you don't have to put Module::Build in the 'requires' key,
build_requires could be dynamically determined by the available version
(on the client) of Module::Build, etc.
Yes, there are details[3]. At the moment, it's just a thought about how
to get compatibility and etc without excessive typing (and without the
need for special knowledge about various oddities and/or history.)
[1] Where "modern" means simply that it is able to change (even in
backwards-incompatible ways in some cases[1a]) independently of
whatever historical accidents. This implies that it is more active
than simply feeding a data-structure to new() and/or having arbitrary
code on either side of that.
[1a] I think incompatibilities would typically be of the "allowed
omission" type. For example, there is no [2] :-)
[3] Starting with perhaps the turing trouble -- to dual-life Build.PL,
the master copy would probably have to be broken down into composeable,
declared pieces ala something like our_require($mod), our_do($file),
and/or heredocs or something which could be assembled into a "dumb"
Build.PL. This is because you need to be able to print some code which
verbosely (as needed based on the target M::B version or etc) sets all
of the new() options, and yet maintain customizations which surround
that.
Still very much just an idea. Gaping holes?
--Eric
--
perl -e 'srand; print join(" ",sort({rand() < 0.5}
qw(sometimes it is important to be consistent)));'
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------