ccflags, not ldflags.
[p5sagit/p5-mst-13.2.git] / pp_ctl.c
index b14e27f..9e73ca2 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -172,6 +172,7 @@ PP(pp_substcont)
     rxres_restore(&cx->sb_rxres, rx);
 
     if (cx->sb_iters++) {
+       I32 saviters = cx->sb_iters;
        if (cx->sb_iters > cx->sb_maxiters)
            DIE(aTHX_ "Substitution loop");
 
@@ -213,6 +214,7 @@ PP(pp_substcont)
            POPSUBST(cx);
            RETURNOP(pm->op_next);
        }
+       cx->sb_iters = saviters;
     }
     if (RX_MATCH_COPIED(rx) && rx->subbeg != orig) {
        m = s;
@@ -2591,6 +2593,7 @@ PP(pp_exit)
 #ifdef VMS
         if (anum == 1 && (PL_op->op_private & OPpEXIT_VMSISH))
            anum = 0;
+        VMSISH_HUSHED  = VMSISH_HUSHED || (PL_op->op_private & OPpHUSH_VMSISH);
 #endif
     }
     PL_exit_flags |= PERL_EXIT_EXPECTED;
@@ -3033,6 +3036,8 @@ PP(pp_require)
     SV *filter_state = 0;
     SV *filter_sub = 0;
     SV *hook_sv = 0;
+    SV *encoding;
+    OP *op;
 
     sv = POPs;
     if (SvNIOKp(sv)) {
@@ -3376,7 +3381,17 @@ trylocal: {
     PL_eval_owner = thr;
     MUTEX_UNLOCK(&PL_eval_mutex);
 #endif /* USE_5005THREADS */
-    return DOCATCH(doeval(gimme, NULL));
+
+    /* Store and reset encoding. */
+    encoding = PL_encoding;
+    PL_encoding = Nullsv;
+
+    op = DOCATCH(doeval(gimme, NULL));
+    
+    /* Restore encoding. */
+    PL_encoding = encoding;
+
+    return op;
 }
 
 PP(pp_dofile)