perldoc pod update
[p5sagit/p5-mst-13.2.git] / pp_hot.c
index f513c12..fa947cf 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1262,7 +1262,7 @@ do_readline(void)
                    warner(WARN_CLOSED,
                           "glob failed (child exited with status %d%s)",
                           STATUS_CURRENT >> 8,
-                          (STATUS_CURRENT & 0xFF) ? ", core dumped" : "");
+                          (STATUS_CURRENT & 0x80) ? ", core dumped" : "");
                }
            }
            if (gimme == G_SCALAR) {
@@ -2281,9 +2281,6 @@ PP(pp_entersub)
        if (CvDEPTH(cv) < 2)
            (void)SvREFCNT_inc(cv);
        else {  /* save temporaries on recursion? */
-           if (CvDEPTH(cv) == 100 && ckWARN(WARN_RECURSION)
-                 && !(PERLDB_SUB && cv == GvCV(PL_DBsub)))
-               sub_crush_depth(cv);
            if (CvDEPTH(cv) > AvFILLp(padlist)) {
                AV *av;
                AV *newpad = newAV();
@@ -2383,6 +2380,13 @@ PP(pp_entersub)
                MARK++;
            }
        }
+       /* warning must come *after* we fully set up the context
+        * stuff so that __WARN__ handlers can safely dounwind()
+        * if they want to
+        */
+       if (CvDEPTH(cv) == 100 && ckWARN(WARN_RECURSION)
+           && !(PERLDB_SUB && cv == GvCV(PL_DBsub)))
+           sub_crush_depth(cv);
 #if 0
        DEBUG_S(PerlIO_printf(PerlIO_stderr(),
                              "%p entersub returning %p\n", thr, CvSTART(cv)));