Document PERL_INSTALL_ROOT of #7210.
[p5sagit/p5-mst-13.2.git] / pp_ctl.c
index 9204879..cf2000e 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1005,10 +1005,17 @@ PP(pp_flip)
     else {
        dTOPss;
        SV *targ = PAD_SV(PL_op->op_targ);
-
-       if ((PL_op->op_private & OPpFLIP_LINENUM)
-         ? (PL_last_in_gv && SvIV(sv) == (IV)IoLINES(GvIOp(PL_last_in_gv)))
-         : SvTRUE(sv) ) {
+       int flip;
+
+       if (PL_op->op_private & OPpFLIP_LINENUM) {
+           struct io *gp_io;
+           flip = PL_last_in_gv
+               && (gp_io = GvIOp(PL_last_in_gv))
+               && SvIV(sv) == (IV)IoLINES(gp_io);
+       } else {
+           flip = SvTRUE(sv);
+       }
+       if (flip) {
            sv_setiv(PAD_SV(cUNOP->op_first->op_targ), 1);
            if (PL_op->op_flags & OPf_SPECIAL) {
                sv_setiv(targ, 1);
@@ -1417,6 +1424,12 @@ Perl_die_where(pTHX_ char *message, STRLEN msglen)
 
            LEAVE;
 
+           /* LEAVE could clobber PL_curcop (see save_re_context())
+            * XXX it might be better to find a way to avoid messing with
+            * PL_curcop in save_re_context() instead, but this is a more
+            * minimal fix --GSAR */
+           PL_curcop = cx->blk_oldcop;
+
            if (optype == OP_REQUIRE) {
                char* msg = SvPVx(ERRSV, n_a);
                DIE(aTHX_ "%sCompilation failed in require",
@@ -2694,11 +2707,7 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, char *code, AV** avp)
 #else
     SAVEVPTR(PL_op);
 #endif
-#ifdef EBCDIC
-    PL_hints = HINT_BYTE;
-#else
     PL_hints = 0;
-#endif
 
     PL_op = &dummy;
     PL_op->op_type = OP_ENTEREVAL;
@@ -3244,11 +3253,7 @@ trylocal: {
 
     PL_rsfp = tryrsfp;
     SAVEHINTS();
-#ifdef EBCDIC
-    PL_hints = HINT_BYTE;
-#else
     PL_hints = 0;
-#endif
     SAVESPTR(PL_compiling.cop_warnings);
     if (PL_dowarn & G_WARN_ALL_ON)
         PL_compiling.cop_warnings = pWARN_ALL ;