develooper Front page | perl.perl5.porters | Postings from September 2013

[perl #8965] Tie'd STDIN overwritten by open F, "<-"

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
September 13, 2013 00:45
Subject:
[perl #8965] Tie'd STDIN overwritten by open F, "<-"
Message ID:
rt-3.6.HEAD-1873-1379033119-1101.8965-15-0@perl.org
On Fri May 25 18:58:02 2012, Hugmeir wrote:
> On Thu Jun 16 16:47:30 2011, chorny wrote:
> > http://rt.perl.org/rt3/Ticket/Display.html?id=8965
> > 
> > On Sat Apr 20 09:32:11 2002, mschilli@michael.ms.com wrote:
> > 
> > > it looks like a tie()d STDIN filehandle gets overwritten if you call
> > > open(FOO, "<-") and use FOO from then on. Somehow it reverts back to
> > > the original STDIN instead of using the tie()d one.
> > 
> > This program:
> > use 5.010;
> > use IO::Handle;
> > say \*STDIN;
> > open FOO, "<-";
> > say \*FOO;
> > 
> > shows that STDIN and FOO are 2 different Perl objects.
> > I suppose 'open FOO, "<-"' means 'open FOO, "<&=STDIN"', this means
> > different Perl filehandle for same OS filehandles and tie works only on
> > Perl filehandles.
> > 
> 
> I agree; Moreso since tied filehandles may have nothing to do with
> actual file descriptors; e.g. a tied FH with a FILENO method can return
> any fileno it wants. So I think this ticket should be rejected.
> 
> --hugmeir


Hugmeir:  No one has responded to you in 15 months.  Would you like to
close the ticket?

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=8965

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