Subject: | Accessing Current File Handle for binmode Operations |
Dear Andrew Sterling Hanenkamp,
Hi. This is imacat from Taiwan. I'm trying your IO::NestedCapture,
and found it is what I was looking for in the past 5 years. Thank you.
However, I have a problem. I need to output and capture Perl utf8
text. utf8 text is an important feature of the Perl 5.8 localization
framework. To handle this output correctly, I need to do the following:
binmode $FH, ":utf8";
Also, I have to output and capture binary files. To do so I need:
binmode $FH;
Both requires accessing the current working file handle, but not the
previous one or next one. But searching through the documetation of
IO-NestedCapture-1.03 I did not see such method. Currently I'm doing
this as a workaround, after peeping into the code:
binmode IO::NestedCapture->instance->{"STDOUT_current"}[-1], ":utf8";
But I suppose I should not do this. Could there be a way to access
the current working file handle? Thank you very much in advance.