This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make perlio line buffer VMS record-oriented files on output.
authorCraig A. Berry <craigberry@mac.com>
Thu, 18 Nov 2010 04:10:57 +0000 (22:10 -0600)
committerCraig A. Berry <craigberry@mac.com>
Thu, 18 Nov 2010 04:24:41 +0000 (22:24 -0600)
commit8c8488cd4fce90cb5c03fb3f89e89c05e5275498
treea386a6434ec9abaaa91f4067ecfe5b12d85127b0
parente4ed29fbb903ac6b15b0ec4a5a6696aaa73401f2
Make perlio line buffer VMS record-oriented files on output.

When perlio flushes down to the unix layer, it can introduce a
spurious record boundary when writing to a record-oriented file.
Perl may create such files when doing edit-in-place or any other
context where the file format is inherited from a previous
version of the file.

The problem can be eliminated by enabling line buffering on such
files when they are opened.  This was a regression in 5.10.0 since
before that stdio's buffering performed the same function.

N.B.  Lines longer than the size of the perlio buffer will still
result in multiple records -- a larger buffer may be necessary.

For more details and discussion see:

http://www.nntp.perl.org/group/perl.vmsperl/2010/11/msg15419.html

Thanks to Martin Zinser for the problem report.
ext/VMS-Stdio/t/vms_stdio.t
perlio.c