if (is_handle_constructor(o,numargs)) {
const char *name = NULL;
STRLEN len = 0;
+ U32 name_utf8 = 0;
flags = 0;
/* Set a flag to tell rv2gv to vivify
SV *const namesv
= PAD_COMPNAME_SV(kid->op_targ);
name = SvPV_const(namesv, len);
+ name_utf8 = SvUTF8(namesv);
}
else if (kid->op_type == OP_RV2SV
&& kUNOP->op_first->op_type == OP_GV)
GV * const gv = cGVOPx_gv(kUNOP->op_first);
name = GvNAME(gv);
len = GvNAMELEN(gv);
+ name_utf8 = GvNAMEUTF8(gv) ? SVf_UTF8 : 0;
}
else if (kid->op_type == OP_AELEM
|| kid->op_type == OP_HELEM)
}
if (tmpstr) {
name = SvPV_const(tmpstr, len);
+ name_utf8 = SvUTF8(tmpstr);
sv_2mortal(tmpstr);
}
}
if (*name != '$')
sv_setpvs(namesv, "$");
sv_catpvn(namesv, name, len);
+ if ( name_utf8 ) SvUTF8_on(namesv);
}
}
kid->op_sibling = 0;
lstat() on filehandle FH at - line 6.
lstat() on filehandle $fh at - line 8.
########
-# TODO ? 1 ? "Scalar filehandles not yet UTF-8 clean" : ''
+
# pp_sys.c [pp_lstat]
use warnings 'io';
use utf8;
close ᶠḨ;
close $fᚺ;
EXPECT
-lstat() on filehandle ᶠḨ at - line 6.
-lstat() on filehandle $fᚺ at - line 8.
+lstat() on filehandle ᶠḨ at - line 7.
+lstat() on filehandle $fᚺ at - line 9.
########
# pp_sys.c [pp_getc]
use warnings qw(unopened closed) ;
Opening dirhandle FOO also as a file at - line 5.
Opening dirhandle $foo also as a file at - line 6.
########
-# TODO ? 1 ? "Scalar filehandles not yet UTF-8 clean" : ''
+
# pp_sys.c [pp_open]
use utf8;
use open qw( :utf8 :std );
open FOO, "../harness";
open $foo, "../harness";
EXPECT
-Opening dirhandle FOO also as a file at - line 7.
-Opening dirhandle $foo also as a file at - line 8.
+Opening dirhandle FOO also as a file at - line 8.
+Opening dirhandle $foo also as a file at - line 9.
########
# pp_sys.c [pp_open_dir]
use warnings;
Opening filehandle FOO also as a directory at - line 5.
Opening filehandle $foo also as a directory at - line 6.
########
-# TODO ? 1 ? "Scalar filehandles not yet UTF-8 clean" : ''
+
# pp_sys.c [pp_open_dir]
use utf8;
use open qw( :utf8 :std );
opendir FOO, ".";
opendir $foo, ".";
EXPECT
-Opening filehandle FOO also as a directory at - line 7.
-Opening filehandle $foo also as a directory at - line 8.
+Opening filehandle FOO also as a directory at - line 9.
+Opening filehandle $foo also as a directory at - line 10.
########
# pp_sys.c [pp_*dir]
use warnings 'io';
rewinddir() attempted on invalid dirhandle $foo at - line 17.
closedir() attempted on invalid dirhandle $foo at - line 18.
########
-# TODO ? 1 ? "Scalar filehandles not yet UTF-8 clean" : ''
+
# pp_sys.c [pp_*dir]
use utf8;
use open qw( :utf8 :std );
closedir($foo);
EXPECT
-readdir() attempted on invalid dirhandle FOO at - line 12.
-telldir() attempted on invalid dirhandle FOO at - line 13.
-seekdir() attempted on invalid dirhandle FOO at - line 14.
-rewinddir() attempted on invalid dirhandle FOO at - line 15.
-closedir() attempted on invalid dirhandle FOO at - line 16.
-readdir() attempted on invalid dirhandle $foo at - line 18.
-telldir() attempted on invalid dirhandle $foo at - line 19.
-seekdir() attempted on invalid dirhandle $foo at - line 20.
-rewinddir() attempted on invalid dirhandle $foo at - line 21.
-closedir() attempted on invalid dirhandle $foo at - line 22.
+readdir() attempted on invalid dirhandle FOO at - line 13.
+telldir() attempted on invalid dirhandle FOO at - line 14.
+seekdir() attempted on invalid dirhandle FOO at - line 15.
+rewinddir() attempted on invalid dirhandle FOO at - line 16.
+closedir() attempted on invalid dirhandle FOO at - line 17.
+readdir() attempted on invalid dirhandle $foo at - line 19.
+telldir() attempted on invalid dirhandle $foo at - line 20.
+seekdir() attempted on invalid dirhandle $foo at - line 21.
+rewinddir() attempted on invalid dirhandle $foo at - line 22.
+closedir() attempted on invalid dirhandle $foo at - line 23.