Subject: | autodie loses open pragma |
Normally, "use open" changes the default encoding of a newly opened
filehandle.
use open ':encoding(utf8)';
open my $fh, ">", "test";
# unix, perlio, encoding(utf8), utf8
print join ", ", PerlIO::get_layers($fh);
Unfortunately it doesn't work with autobox turned on. This is because
the open pragma is lexical, and autobox causes the real CORE::open to
happen out of open.pm's scope.
I don't have a solution for this. At minimum its a caveat worth mentioning.