Michael Schwern wrote:

!> No - please do not bother.  F$parse() is enough of a wrapper around
!> sys$parse that if it cannot provide an extra layer of de-obfuscation
!> then there may be no point in taking matters any further.
!
!Yes, I seems less complicated to just use Perl.  Hopefully I can
!minimize the number of seperate perl "-MFile::Spec" calls a bit
!without exceeding 256 characters.
!
!File the idea under "O" for "Oh well".

We've presented a non perl solution to you, that should be
adequate for at least 85 to 99% of usage (possibnly all),
provided that having record boundaries (i.e. line feeds)
in .MM_tmp is acceptable to the perl utility that
uses it as input, presumably ExtUtils::Install:pm_to_blib(),
or somesuch.

John was contemplating writing a non DCL high level language call
in to a system service known as sys$parse().  Such an endeavor
could be written in C (anyone attempting to build XS modules
on VMS would need to have a working, licensed C compiler anyway).
Were he to do that it would preclude the ability of anyone
installing a pure perl module distribution if they did not
have a C compiler on their VMS perl machine.  There are such folk,
and they depend on the precompiled binary distributions of
perl (among other things).

So what you could do is demonstrated by the use of the
"-" and "+" string operators in the DCL sections of the
following test descrip.mms file:

NOECHO = @

PERL_ARCHLIB = perl_root:[lib.VMS_AXP.5_7_3]
PERL_ARCHLIB_EUROPE = perl_root:<lib.VMS_AXP.5_7_3>
FULLEXT = [.ExtUtils.MakeMaker]
FULLEXT_EUROPE = <.ExtUtils.MakeMaker>
INSTALLARCHLIB = perl_root:[lib.VMS_AXP.5_7_3]
INSTALLARCHLIB_EUROPE = perl_root:<lib.VMS_AXP.5_7_3>
INST_LIB = [.blib.lib]
INSTALLPRIVLIB = perl_root:[lib]
INST_ARCHLIB = [.blib.arch]
INST_BIN = [.blib.bin]
INSTALLBIN = perl_root:[000000]

all :
      $(NOECHO) OPEN/WRITE TMP .MM_tmp
      $(NOECHO) WRITE TMP "read " + 
(("$(PERL_ARCHLIB)"-"]"-">")+".")+"auto"+("$(FULLEXT)"-"["-"<")+".packlist"
      $(NOECHO) WRITE TMP "write " + 
(("$(INSTALLARCHLIB)"-"]"-">")+".")+"auto"+("$(FULLEXT)"-"["-"<")+".packlist"
      $(NOECHO) WRITE TMP "read " + 
(("$(PERL_ARCHLIB_EUROPE)"-"]"-">")+".")+"auto"+("$(FULLEXT_EUROPE)"-"["-"<")+".packlist"
      $(NOECHO) WRITE TMP "write " + 
(("$(INSTALLARCHLIB_EUROPE)"-"]"-">")+".")+"auto"+("$(FULLEXT_EUROPE)"-"["-"<")+".packlist"
      $(NOECHO) WRITE TMP "$(INST_LIB)     $(INSTALLPRIVLIB)"
      $(NOECHO) WRITE TMP "$(INST_ARCHLIB) $(INSTALLARCHLIB)"
      $(NOECHO) WRITE TMP "$(INST_BIN)     $(INSTALLBIN)"
      $(NOECHO) CLOSE TMP
      TYPE .MM_tmp
!     $(NOECHO) Delete/NoLog/NoConfirm .MM_tmp;

If I run that I obtain:

$ mms

TYPE .MM_tmp
read perl_root:[lib.VMS_AXP.5_7_3.auto.ExtUtils.MakeMaker].packlist
write perl_root:[lib.VMS_AXP.5_7_3.auto.ExtUtils.MakeMaker].packlist
read perl_root:<lib.VMS_AXP.5_7_3.auto.ExtUtils.MakeMaker>.packlist
write perl_root:<lib.VMS_AXP.5_7_3.auto.ExtUtils.MakeMaker>.packlist
[.blib.lib]     perl_root:[lib]
[.blib.arch] perl_root:[lib.VMS_AXP.5_7_3]
[.blib.bin]     perl_root:[000000]

And just for fun if I run f$parse() on one of the non
North American file specification expressions I
obtain the following:

$ aaa = 
f$parse("perl_root:<lib.VMS_AXP.5_7_3.auto.ExtUtils.MakeMaker>.packlist",,,,"SYNTAX_ONLY")
$ sho sym aaa
  AAA = "PERL_ROOT:<LIB.VMS_AXP.5_7_3.AUTO.EXTUTILS.MAKEMAKER>.PACKLIST;"

The tiny forseeable case where the above DESCRIP.MMS
template may not work would be for someone who
specified a "-Dprefix=DKB100:[NOUVOUS_PERL.>" whilst
attempting to configure the build of perl from source.
However, such a person faces serious trouble trying
to get "MMS install" to work for perl anyway and
MakeMaker should not be held responsible for such a
misconfiguration (if anything, it is configure.com
in the perl distribution that should watch out
for such user input mistakes, there was even a time
when f$parse() was in there, sans "SYNTAX_ONLY".  It
was taken out for other reasons (it should be
possible to configure a build for installation on
an unmounted drive e.g.)).

I note three places where a .MM_tmp file is read
for input in a MakeMaker derived descrip.mms file:

$ search descrip.mms mm_tmp,perl,"<"/match=and
        $(NOECHO) $(PERL) .MM2_tmp <.MM_tmp >>$(INSTALLARCHLIB)perllocal.pod
        $(NOECHO) $(PERL) .MM2_tmp <.MM_tmp >>$(INSTALLARCHLIB)perllocal.pod
        $(PERL) "-I$(PERL_LIB)" "-MExtUtils::Install" -e "pm_to_blib({split(' 
',<STDIN>)},'[.blib.lib.auto]','$(PM_FILTER)')" <.MM_tmp

The stuff in the .MM_tmp and .MM2_tmp file that
goes into perllocal.pod is distinct from the
..MM_tmp that is used by ExtUtils::Install::pm_to_blib()
hence should not be a concern of the particular .MM_tmp file that
you are trying to make sans perl.  However,
the constuct that looks like:

 -e "pm_to_blib({split(' ',<STDIN>)},'[.blib.lib.auto]','$(PM_FILTER)')" <.MM_tmp
                 ^^^^^^^^^^^^^^^^^^
won't work and a split of record boundaries
along the (WARNING) untested lines of:

-e "pm_to_blib({split(""\n"",<STDIN>)},'[.blib.lib.auto]','$(PM_FILTER)')" <.MM_tmp

Would probably need to be used instead.  The
reason is that the
C<perl -e "print $stuff" >> .MM_tmp> does put
everything on one line inside of .MM_tmp,
instead of a separate line for each WRITE
statement in the DCL that you have proposed.

Is the recommendation clear?  Can it be made
acceptable to ExtUtils::Install?

Please note that I cannot run cvs out of the
firewall here and would need to test only
on ftp-able or http-able "make dist"
distributions.

Peter Prymmer


Reply via email to