Fix the NAME in two old perlXYZdelta.pod files
[p5sagit/p5-mst-13.2.git] / pp_hot.c
index a74be21..3371e88 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1209,10 +1209,13 @@ PP(pp_qr)
     SV * const rv = sv_newmortal();
 
     SvUPGRADE(rv, SVt_IV);
-    /* This RV is about to own a reference to the regexp. (In addition to the
-       reference already owned by the PMOP.  */
-    ReREFCNT_inc(rx);
-    SvRV_set(rv, MUTABLE_SV(rx));
+    /* For a subroutine describing itself as "This is a hacky workaround" I'm
+       loathe to use it here, but it seems to be the right fix. Or close.
+       The key part appears to be that it's essential for pp_qr to return a new
+       object (SV), which implies that there needs to be an effective way to
+       generate a new SV from the existing SV that is pre-compiled in the
+       optree.  */
+    SvRV_set(rv, MUTABLE_SV(reg_temp_copy(NULL, rx)));
     SvROK_on(rv);
 
     if (pkg) {
@@ -1258,7 +1261,11 @@ PP(pp_match)
     }
 
     PUTBACK;                           /* EVAL blocks need stack_sp. */
-    s = SvPV_const(TARG, len);
+    /* Skip get-magic if this is a qr// clone, because regcomp has
+       already done it. */
+    s = ((struct regexp *)SvANY(rx))->mother_re
+        ? SvPV_nomg_const(TARG, len)
+        : SvPV_const(TARG, len);
     if (!s)
        DIE(aTHX_ "panic: pp_match");
     strend = s + len;
@@ -2474,7 +2481,7 @@ PP(pp_leavesub)
     }
     PUTBACK;
 
-    LEAVE_with_name("sub");
+    LEAVE;
     cxstack_ix--;
     POPSUB(cx,sv);     /* Stack values are safe: release CV and @_ ... */
     PL_curpm = newpm;  /* ... and pop $1 et al */
@@ -2535,7 +2542,7 @@ PP(pp_leavesublv)
         * the refcounts so the caller gets a live guy. Cannot set
         * TEMP, so sv_2mortal is out of question. */
        if (!CvLVALUE(cx->blk_sub.cv)) {
-           LEAVE_with_name("sub");
+           LEAVE;
            cxstack_ix--;
            POPSUB(cx,sv);
            PL_curpm = newpm;
@@ -2550,7 +2557,7 @@ PP(pp_leavesublv)
                 * of a tied hash or array */
                if (SvFLAGS(TOPs) & (SVs_TEMP | SVs_PADTMP | SVf_READONLY) &&
                    !(SvRMAGICAL(TOPs) && mg_find(TOPs, PERL_MAGIC_tiedelem))) {
-                   LEAVE_with_name("sub");
+                   LEAVE;
                    cxstack_ix--;
                    POPSUB(cx,sv);
                    PL_curpm = newpm;
@@ -2566,7 +2573,7 @@ PP(pp_leavesublv)
                }
            }
            else {                      /* Should not happen? */
-               LEAVE_with_name("sub");
+               LEAVE;
                cxstack_ix--;
                POPSUB(cx,sv);
                PL_curpm = newpm;
@@ -2583,7 +2590,7 @@ PP(pp_leavesublv)
                    && SvFLAGS(*mark) & (SVs_TEMP | SVs_PADTMP | SVf_READONLY)) {
                    /* Might be flattened array after $#array =  */
                    PUTBACK;
-                   LEAVE_with_name("sub");
+                   LEAVE;
                    cxstack_ix--;
                    POPSUB(cx,sv);
                    PL_curpm = newpm;
@@ -2638,7 +2645,7 @@ PP(pp_leavesublv)
     }
     PUTBACK;
 
-    LEAVE_with_name("sub");
+    LEAVE;
     cxstack_ix--;
     POPSUB(cx,sv);     /* Stack values are safe: release CV and @_ ... */
     PL_curpm = newpm;  /* ... and pop $1 et al */
@@ -2668,7 +2675,7 @@ PP(pp_entersub)
            cv = sv_2cv(sv, &stash, &gv, 0);
        }
        if (!cv) {
-           ENTER_with_name("sub");
+           ENTER;
            SAVETMPS;
            goto try_autoload;
        }
@@ -2700,7 +2707,7 @@ PP(pp_entersub)
            if (!sym)
                DIE(aTHX_ PL_no_usym, "a subroutine");
            if (PL_op->op_private & HINT_STRICT_REFS)
-               DIE(aTHX_ PL_no_symref, sym, len>32 ? "..." : "", "a subroutine");
+               DIE(aTHX_ "Can't use string (\"%.32s\"%s) as a subroutine ref while \"strict refs\" in use", sym, len>32 ? "..." : "");
            cv = get_cvn_flags(sym, len, GV_ADD|SvUTF8(sv));
            break;
        }
@@ -2722,7 +2729,7 @@ PP(pp_entersub)
        break;
     }
 
-    ENTER_with_name("sub");
+    ENTER;
     SAVETMPS;
 
   retry:
@@ -2882,7 +2889,7 @@ try_autoload:
                *(PL_stack_base + markix) = *PL_stack_sp;
            PL_stack_sp = PL_stack_base + markix;
        }
-       LEAVE_with_name("sub");
+       LEAVE;
        return NORMAL;
     }
 }