develooper Front page | perl.perl5.porters | Postings from January 2020

Re: binmode(IO, ':unix') and open(IO, '+>:unix', undef) leak

Thread Previous | Thread Next
Eric Wong
January 29, 2020 08:20
Re: binmode(IO, ':unix') and open(IO, '+>:unix', undef) leak
Message ID:
Leon Timmermans <> wrote:
> On Sat, Jan 25, 2020 at 1:49 AM Eric Wong <> wrote:
> > OK.  Just for my own curiosity, would a long-term solution be to
> > pop off the perlio (and any other layers) on binmode(..., ':unix')?
> TBH I can't think of any valid reason to do binmode ":unix", and if
> you really want to get rid of the buffering layer after opening, :pop
> is still there.

Ah, I didn't know about :pop, or I learned about it but promptly
forgot about it since it was labeled "experimental" in the past.

Normally I'd use sysseek+sysread to avoid buffering, but I also
wanted PerlIO::scalar compatibility for a particular bit of code.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About