provisional MakeMaker patch for VMS
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index 9b1556e..ed199b2 100644 (file)
--- a/op.c
+++ b/op.c
@@ -2043,6 +2043,9 @@ S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp)
     } else if (type == OP_RV2SV ||     /* "our" declaration */
               type == OP_RV2AV ||
               type == OP_RV2HV) { /* XXX does this let anything illegal in? */
+      if (cUNOPo->op_first->op_type != OP_GV) { /* MJD 20011224 */
+           yyerror(Perl_form(aTHX_ "Can't declare %s in my", OP_DESC(o)));
+        }
         if (attrs) {
             GV *gv = cGVOPx_gv(cUNOPo->op_first);
             PL_in_my = FALSE;
@@ -3127,12 +3130,16 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl)
            p = SvPV(pat, plen);
            pm->op_pmflags |= PMf_SKIPWHITE;
        }
+        if (DO_UTF8(pat) || (PL_hints & HINT_UTF8))
+           pm->op_pmdynflags |= PMdf_UTF8;
        PM_SETRE(pm, CALLREGCOMP(aTHX_ p, p + plen, pm));
        if (strEQ("\\s+", PM_GETRE(pm)->precomp))
            pm->op_pmflags |= PMf_WHITE;
        op_free(expr);
     }
     else {
+        if (PL_hints & HINT_UTF8)
+           pm->op_pmdynflags |= PMdf_UTF8;
        if (pm->op_pmflags & PMf_KEEP || !(PL_hints & HINT_RE_EVAL))
            expr = newUNOP((!(PL_hints & HINT_RE_EVAL)
                            ? OP_REGCRESET