develooper Front page | perl.vmsperl | Postings from May 2002

Re: [PATCH: perl@16826] small updates to DCL portions of perl kit

Thread Previous
From:
Craig A. Berry
Date:
May 31, 2002 11:41
Subject:
Re: [PATCH: perl@16826] small updates to DCL portions of perl kit
Message ID:
a05111711b91d7001afb0@[172.16.52.1]
At 12:51 PM -0400 5/31/02, Brian Tillman wrote:
>PPrymmer@factset.com writes:
>
>> $ echo4 "The perl_setup.com file is now being written..."
>> $ file_2_find = "[-]perl_setup.com"
>>-$ OPEN/WRITE CONFIG 'file_2_find'
>>+$!
>>+$! Folks are likely to want to edit perl_setup.com.
>>+$! STMLF RFM plays nicer with ported editors than does VFC.
>>+$!
>>+$ CREATE [-]CONFIG.FDL
>>+$ DECK
>>+RECORD
>>+  FORMAT STREAM_LF
>>+$ EOD
>>+$ CREATE /FDL=[-]CONFIG.FDL 'file_2_find'
>>+$ OPEN/APPEND CONFIG 'file_2_find'
>>+$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;
>> $ WRITE CONFIG "$!"
>> $ WRITE CONFIG "$! Perl_Setup.com    ''cf_time'"
>> $ IF cf_email.NES.perladmin
>
>This really isn't the correct approach at all.  

I don't know that it's incorrect, though it could be done more simply like

$ create 'file_2_find'
$ set file/attribute=(RFM:STMLF,RAT:CR) 'file_2_find'
$ open/append config 'file_2_find'

but I'm not sure when set file got the ability to do that and Peter's
method might be safer for very old versions of VMS.

>Instead, do this:
>
>$ create 'file_2_find'
>$ open/append config 'file_2_find'
>
>This will create a native VMS text file that any VMS-based editor, including
>the ported ones, will like.  No FDL file manipulation needed and no
>Stream_LF file created (which is not the native format of a text file,
>anyway).

Your method creates a file with RFM:VAR, RAT:CR attributes, and that
might well be as good as what Peter has for the file in question.  I
can't see that it's any better, though.  Files of this format do tend
to have trouble with extremely long lines, but I don't think that
would ever be an issue for perl_setup.com.  I like the idea of
something simpler that doesn't require the creation of an FDL file,
but it's too late to change this for 5.8.0 unless we can prove that
what we've got really breaks something important.
-- 
________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Thread Previous


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