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

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

Thread Previous | Thread Next
From:
Bo Lindbergh
Date:
September 1, 2017 03:13
Subject:
Re: [perl #132008] Term::ReadLine generates empty &STDERR files
Message ID:
E3DAE854-C80C-4A02-919A-50FF36451360@stacken.kth.se
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?


/Bo Lindbergh

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