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

[perl #132008] Term::ReadLine generates empty &STDERR files

Thread Previous
From:
James E Keenan via RT
Date:
September 1, 2017 03:25
Subject:
[perl #132008] Term::ReadLine generates empty &STDERR files
Message ID:
rt-4.0.24-16160-1504236299-1623.132008-15-0@perl.org
On Fri, 01 Sep 2017 03:13:59 GMT, blgl@stacken.kth.se wrote:
> Quoth Todd Rinaldo:
> > The problem is that redirecting file handles to STDERR (open (my $fh,
> > ">&STDERR)) cannot be done as a 3 arg open or it'll actually try to
> > write to that file.
> 
> Yes, it can!
> 
>     open(my $fh, ">&", \*STDERR)
> 
> Getting Term::ReadLine to use this may involve breaking compatibility,
> since the findConsole method assumes 2-arg open.  Is findConsole ever
> called from outside the Term::ReadLine::* space?
> 
> 

findConsole is clearly documented, so we should assume that it's callable from outside that space.

#####
"findConsole"
returns an array with two strings that give most appropriate names for files for input and output using conventions "<$in", ">out".
#####

> /Bo Lindbergh


-- 
James E Keenan (jkeenan@cpan.org)

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

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