set utf8 bit on inferred method names when C<use utf8>
Chip Salzenberg [Wed, 26 Aug 2009 21:05:15 +0000 (14:05 -0700)]
toke.c

diff --git a/toke.c b/toke.c
index 734c516..24b3c40 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -2824,7 +2824,7 @@ S_intuit_method(pTHX_ char *start, GV *gv, CV *cv)
       bare_package:
            start_force(PL_curforce);
            NEXTVAL_NEXTTOKE.opval = (OP*)newSVOP(OP_CONST, 0,
-                                                  newSVpvn(tmpbuf,len));
+                                                 S_newSV_maybe_utf8(tmpbuf,len));
            NEXTVAL_NEXTTOKE.opval->op_private = OPpCONST_BARE;
            if (PL_madskills)
                curmad('X', newSVpvn(start,SvPVX(PL_linestr) + soff - start));