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

=?UTF-8?Q?Re=3A_=5Bperl_=2397822=5D_=C2=ABuse_open=C2=BB_and_opening_tempfiles?==?UTF-8?Q?_causes_double_application_of_layers?=

Thread Previous
From:
Leon Timmermans
Date:
January 17, 2012 11:33
Subject:
=?UTF-8?Q?Re=3A_=5Bperl_=2397822=5D_=C2=ABuse_open=C2=BB_and_opening_tempfiles?==?UTF-8?Q?_causes_double_application_of_layers?=
Message ID:
CAHhgV8h4qDkN1VghfkVgOZp91149FWKqWvaqyNB9Ba+ZnrC9yA@mail.gmail.com
On Mon, Oct 17, 2011 at 1:49 AM, Brian Fraser <fraserbn@gmail.com> wrote:
> The bad-but-quick way to fix this is to replace the PerlIO_fdopen()s in
> PerlIO_tmpfile() with PerlIO_openn() calls that pass ":" as the layers
> argument.
>
> That's bad because of this:
> <leont> I can think of some situations where it is the wrong thing to do,
> mostly because you push layers after open, instead of opening with the
> layers.

Still, it may be good enough as a stopgap until the real fix arrives.

> So I'm thinking that the best solution would be to have a tmpfile()
> variation that takes a layers argument, and have the current tmpfile() as a
> wrapper around that.

Yeah, that'd make sense.

Leon

Thread Previous


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