in reply to Encode::decode_utf8 and references
I use decode_utf8 in a custom override of CGI's param() method, to give me properly flagged unicode strings. When I installed Encode 2.08, file uploads broke, because the incoming file handles got mangled. I fixed this issue inside my custom param() method, but I suppose you could also brute-force the issue by overriding decode_utf8:
{ no warnings 'redefine'; my $decode_utf8_orig = \&Encode::decode_utf8; *Encode::decode_utf8 = sub { return $_[0] if ref $_[0]; # avoid mangling references. goto &$decode_utf8_orig; # original behavior for normal +scalars. } }
|
|---|