Re: Problem with VMS Carriage return carriage control files in 5.10 and 5.12
"Craig A. Berry" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.ports.vms |
|---|---|
| Message-ID | <[email protected]> |
On Apr 22, 2010, at 2:39 PM, [email protected] wrote: > First of all thanks a lot for your insightfull comments. A couple of > the > suggestions do restore the previous behaviour, in particular > > * define PERLIO "stdio" > * use open OUT => ':stdio'; > * open(TXT, '>:stdio', 'test.lis'); > > all produce the same output as 5.8.x . > > Setting stdio as the standard during using configure.com does cause > the > compilation of perl to fail. > CC/DECC/NOANSI_ALIAS > /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList > /float=ieee/ieee=denorm/Define=(PERL_CORE,_USE_STD_STAT=1) VMS.C > > && PL_perlio_fd_refcnt) > ................^ > %CC-E-UNDECLARED, In this statement, "PL_perlio_fd_refcnt" is not > declared. > at line number 3080 in file DSA0:[PUBLIC.GNU.PERLSTD]vms.c;1 This is a bug. Obviously the non-perlio case hasn't been tested recently. > Any further ideas? I think we're just getting started on a proper analysis. Looking at: <http://perldoc.perl.org/PerlIO.html#Defaults-and-how-to-override-them> I believe on VMS we are getting the perlio layers "unix perlio" when what we want (and what happens on other platforms) is "unix stdio". Without the stdio layer we are not getting whatever RMS-aware magic is in the CRTL to try to Do The Right Thing with record-oriented files. At least that's my current working theory, which I haven't really proven yet. I do have a simpler reproducer: $ type rectest.pl use strict; use warnings; use VMS::Stdio qw( vmsopen ); 1 while unlink 'rectest.lis'; my $fh = vmsopen('>rectest.lis', 'rfm=var', 'rat=cr') or die "Couldn't open rectest.lis: $!"; for (1..4097) { print $fh 'Z'; } close $fh; [end] What you get with this is a file with 4096 Zs on the first line, then a record boundary, then one Z on a second line. ________________________________________ Craig A. Berry mailto:[email protected] "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser