Steven's manifypods patch gave me the motivation to finally do something
I've been meaning to do since I took over MakeMaker.  Namely to seperate out
the generation of each make target into individual methods.  This allows
fine-grained overriding of MakeMaker's functionality both for external users
and for internal users.

I've started with the dist_core() method.  MM_VMS was overriding it just to
do slight alterations to three targets.  It has been seperated into
dist_target, tardist_target, uutardist_target, tarfile_target,
zipdist_target, zipfile_target and shdist_target methods.  One method for
each target.  dist_core() now just calls each of those methods and
concatinates the results together.  As a result instead of MM_VMS overriding
all of dist_core it can just override zipfile_target, tarfile_target and
shdist_target removing a chunk of redundancy.

This also means the *_target methods can be moved out of MM_Unix and into
MM_Any.  Even though they're not totally cross-platform, they're pretty
close.

I haven't decided how to organize the *_target methods.  Should they be
grouped together or kept together with related code?  (ie. would dist_target
go near dist_core?)  I'm thinking the former and let the methods which just
pull together bunches of targets fade away into compatibility obscurity.

Another approach is to move all the _target methods off into their own class
and have a hierarchy of platform dependent target classes (ie.
EU::Target::Unix, EU::Target::VMS, etc..) and then inherit from both an
EU::Target::* and an EU::MM_* class.

I've considered having MM delegate to an EU::Target object rather than
inherit, but there's just too much information inside the MM object needed
to generate targets and I don't want to complicate things by having to pass
it all around.  Not yet anyway.

Meanwhile, if anyone has the urge, you can start pulling apart some methods
that generate multiple targets.  If you're going to do something that might
take a while, like install(), post to the list so we don't trip on each
other.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
gigaconway: a hypothetical unit of mind expansion, so disturbing it
  is likely to change the fundemental nature of the universe.  Some
  contend that gigaconway events, while rare, are much cheaper to produce
  than antiprotons, nuclear weapons or even XML specifications, and start
  at US$60,000 each.  If you believe gigaconway events are indeed possible,
  please send your tax deductable contributions to:

    The Conway Fund,
    c/o Yet Another Society
    http://www.yetanother.org/
        -- Ziggy              

Reply via email to