On Wed Jul 04 07:59:23 2012, dmcbride@cpan.org wrote:
> The following code has two surprises.
>
> a) the layers for STDOUT are different for input vs output.
> b) the layers for STDOUT's output are missing the utf8 layer after
> the reopening. (They're missing for $fh, too.)
>
> (Thanks to #perl for pointing me to PerlIO and that the layers can
> be different, and to leont on #p5p for pointing me to re-opening
> issues.)
I found this lovely explanation in do_openn (doio.c:597):
/* Eeek - FIXME !!!
* If this is a standard handle we discard all the layer stuff
* and just dup the fd into whatever was on the handle before !
*/
This has been there since 2001 (e99cca91) :-(
Leon
---
via perlbug: queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=113982