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

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

Thread Previous | Thread Next
From:
Eric Wong
Date:
January 29, 2020 08:20
Subject:
Re: binmode(IO, ':unix') and open(IO, '+>:unix', undef) leak
Message ID:
20200129082027.GA26778@dcvr
Leon Timmermans <fawaka@gmail.com> wrote:
> On Sat, Jan 25, 2020 at 1:49 AM Eric Wong <p5p@yhbt.net> 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.

Thanks.

Thread Previous | Thread Next


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