develooper Front page | perl.perl5.porters | Postings from July 2001

Re: VMS-style command quoting and MakeMaker

Thread Previous | Thread Next
From:
schwern
Date:
July 9, 2001 15:14
Subject:
Re: VMS-style command quoting and MakeMaker
Message ID:
20010709181438.F26141@magnonel.guild.net
On Mon, Jul 09, 2001 at 02:01:07PM -0700, Peter Prymmer wrote:
> There is considerably more to MM_VMS than just the double quotations.  In
> fact I would assert that much of MM_VMS.pm is: 
> 
> 0) getting around DCL's 255 character command line limit (that affects
> command lines run from MMS or
> MMK make utilities)

Eeek, you can keep that.


> 1) changing 'alist.o of_object.o files.o' to 
> 'alist$(OBJ), of_object$(OBJ), files$(OBJ)' (note the use of the commas in
> the latter) 

Hmmm, should be able to make the MM_Unix methods to be more flexible
about their extensions, but the commas thing might be tricky.


> Hence it may prove difficult or impossible to get rid of MM_VMS.pm,
> certainly without littering MM_Unix.pm with oodles of C<if ($^O eq 'VMS')>
> which kind of defeats the whole code re-use idea of MakeMaker.

Oh, it will always be around, yes.

My Grand Plan is to split out much of the generic bits of MM_Unix into
MM_Virtual which would act like a real base class with real virtual
methods.  Hopefully eliminate alot of the C<if $^O eq 'Win32'>
exceptions already in MM_Unix.

The big problem is MakeMaker violates the seperation of form and
functionality so often.  Most methods spit out formated Makefile
fragments instead of a data structure which can then be formatted.
Alot of the work of building a useful MM_Virtual will be seperating
most of the methods into "thing that returns the data" and "thing that
formats it".

For example, your list of object files above might instead be overridden as:

	sub objects {	# I forget what the real name is
	    my($self) = shift;
	    my @object_files = $self->object_files;
	    return join ', ', map { $_.'$(OBJ)' } @object_files;
	}

so the work for porting MakeMaker is reduced to writing a formatting
wrapper method.

-- 
Michael G Schwern   <schwern@pobox.com>   http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <perl-qa@perl.org>       Kwalitee Is Job One

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About