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

Re: VMS-style command quoting and MakeMaker

Thread Previous | Thread Next
July 9, 2001 15:14
Re: VMS-style command quoting and MakeMaker
Message ID:
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 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,
> certainly without littering 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   <>
Perl6 Quality Assurance     <>       Kwalitee Is Job One

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