From 6c6f933a6416c413550c8608c317f275385d7a04 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sun, 25 Mar 2012 17:51:08 -0700 Subject: [PATCH] globify scalar uses utf8 scalars --- Debbugs/Common.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Debbugs/Common.pm b/Debbugs/Common.pm index 8809898..d4eab8c 100644 --- a/Debbugs/Common.pm +++ b/Debbugs/Common.pm @@ -823,7 +823,8 @@ sub globify_scalar { if (defined ref($scalar)) { if (ref($scalar) eq 'SCALAR' and not UNIVERSAL::isa($scalar,'GLOB')) { - return IO::Scalar->new($scalar); + open $handle, '>:scalar:utf8', $scalar; + return $handle; } else { return $scalar; @@ -836,7 +837,7 @@ sub globify_scalar { carp "Given a non-scalar reference, non-glob to globify_scalar; returning /dev/null handle"; } } - return IO::File->new('/dev/null','w'); + return IO::File->new('/dev/null','>:utf8'); } =head2 cleanup_eval_fail() -- 2.39.2