Hello Craig, almost there ;-)
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 . Unfortunatly the suggested solution I really would like to implement (since it requires not code/setup changes) does give me a headache. Setting stdio as the standard during using configure.com does cause the compilation of perl to fail. Here is what I did: * Unpack perl into a clean directory * @configure ... --> Default answers for everything but Use the PerlIO abstraction layer? [y] n Ok, doing things the stdio way. ... * mmk which fails in vms.c with the following error: Copy/Log/Noconfirm [.vms]vms.c [] %COPY-S-COPIED, DSA0:[PUBLIC.GNU.PERLSTD.vms]vms.c;1 copied to DSA0:[PUBLIC.GNU. PERLSTD]vms.c;1 (864 blocks) 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 && PL_perlio_fd_refcnt) .............^ %CC-E-UNDECLARED, In this statement, "PL_perlio_fd_refcnt" is not declared. at line number 4688 in file DSA0:[PUBLIC.GNU.PERLSTD]vms.c;1 && PL_perlio_fd_refcnt) ............^ %CC-E-UNDECLARED, In this statement, "PL_perlio_fd_refcnt" is not declared. at line number 4715 in file DSA0:[PUBLIC.GNU.PERLSTD]vms.c;1 %MMK-F-ERRUPD, error status %X10B91262 occurred when updating target VMS.OBJ Now, as far as I can see in the code/listing PL_perlio_fd_refcnt is either defined in embedvar.h or perlapi.h, but in perlapi.h only if Multiplicity is defined (which I guess is related to the non-default multiplicity option in configure.com) and in embedvar.h the definition is skipped because PERL_GLOBAL_STRUCT is not defined, so this is where the error seems to originate. Any further ideas? Greetings, Martin "Craig A. Berry" <craigbe...@mac.com> 22.04.2010 05:44 To "John E. Malmberg" <wb8...@qsl.net> cc martin.zin...@deutsche-boerse.com, vmsperl@perl.org Subject Re: Problem with VMS Carriage return carriage control files in 5.10 and 5.12 On Apr 21, 2010, at 8:04 PM, John E. Malmberg wrote: > martin.zin...@deutsche-boerse.com wrote: >> Hello Colleagues, >> I am currently trying to drag our development team kicking and >> screaming into the century of the fruitbat, but what looks like a >> bug in 5.10.1 and 5.12.0 is a stumbling block. >> Problem description: >> If you open a text file with Carriage return carriage control for >> output (based off an existing file) and populate the new file with >> longer records, at some point gratuitous line breaks are added to >> the file. >> This does not happen with either Perl 5.8.0 on Alpha, nor Perl >> 5.8.5 on Itanium (in that case the hp build). It does happen with >> both 5.10.1 and 5.12.0 on Itanium. Thanks for the report, and especially for the concise reproducer. The first thing that springs to mind in this area regarding changes between 5.8.x and 5.10.x is the default PerlIO behavior. I don't remember exactly when it changed, and the change might not have been documented as well as it should have been since it wouldn't have made any difference with stream-oriented files, but basically it's now doing the unixio write() rather than the stdio fwrite() by default. It's not especially surprising that fwrite() is a bit more simpatico with record-oriented files than is write(). There are umpteen different ways to get the old behavior or accommodate the new behavior. There is a configure-time option to disable perlio, which is equivalent to doing: $ define PERLIO "stdio" at run-time. Or you can add: use open OUT => ':stdio'; before the open statement (<http://perldoc.perl.org/open.html>). Or push the stdio layer as part of the open statement itself (< http://perldoc.perl.org/functions/open.html >): --- mztest.com;-0 2010-04-21 19:33:50 -0500 +++ mztest.com 2010-04-21 22:30:11 -0500 @@ -23,7 +23,7 @@ $ ENDIF $! $ perl -w SYS$INPUT: 'p1' $ DECK -open( TXT, ">test.lis"); +open TXT, '>:stdio', 'test.lis'; for ($i=0;$i<=120;$i++){ printf( TXT [end] Or you can force the file to be a stream file using vmssysopen. Or you can experiment with syswrite or vmssyswrite instead of print so that you control the size of the record you are writing. Or you could (possibly, depending on the real-world problem behind the reproducer) create the existing file as STREAM_LF (or convert it to such) before Perl ever sees it and inherits its default record attributes. > The issue is that the pipe emulation code in perl adds extra new- > lines to output from subprocesses. Since there is no piping in Martin's reproducer, I'd say there's about a 0% chance pipes have anything to do with it. > The size of the mailbox buffer may have something to do with when > the new-line is added. It may be that something changed there. In > PERLVMS.POD, it documents that PERL_MBX_SIZE controls this with a > default of 512 bytes. That's the most common cause of newlines where you don't want them, but not in this case. BTW, the default is now 8192 bytes in 5.12.0. ________________________________________ Craig A. Berry mailto:craigbe...@mac.com "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser ----------------------------------------- Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen ist nicht gestattet. The information contained in this message is confidential or protected by law. If you are not the intended recipient, please contact the sender and delete this message. Any unauthorised copying of this message or unauthorised distribution of the information contained herein is prohibited. Legally required information for business correspondence/ Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz: http://deutsche-boerse.com/letterhead