Repost of fork() debugger patch
[p5sagit/p5-mst-13.2.git] / pp_ctl.c
index 6052cb2..df28463 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -724,7 +724,7 @@ PP(pp_sort)
                cx->blk_gimme = G_SCALAR;
                PUSHSUB(cx);
                if (!CvDEPTH(cv))
-                   SvREFCNT_inc(cv);   /* in preparation for POPSUB */
+                   (void)SvREFCNT_inc(cv); /* in preparation for POPSUB */
            }
            sortcxix = cxstack_ix;
 
@@ -773,6 +773,7 @@ PP(pp_flip)
            sv_setiv(PAD_SV(cUNOP->op_first->op_targ), 1);
            if (op->op_flags & OPf_SPECIAL) {
                sv_setiv(targ, 1);
+               SETs(targ);
                RETURN;
            }
            else {
@@ -2261,6 +2262,9 @@ PP(pp_require)
 #ifdef DOSISH
       || (name[0] && name[1] == ':')
 #endif
+#ifdef WIN32
+      || (name[0] == '\\' && name[1] == '\\')  /* UNC path */
+#endif
 #ifdef VMS
        || (strchr(name,':')  || ((*name == '[' || *name == '<') &&
            (isALNUM(name[1]) || strchr("$-_]>",name[1]))))
@@ -2313,12 +2317,13 @@ PP(pp_require)
                sv_catpv(msg, " (change .h to .ph maybe?)");
            if (instr(SvPVX(msg), ".ph "))
                sv_catpv(msg, " (did you run h2ph?)");
-           sv_catpv(msg, "\n@INC contains:\n ");
+           sv_catpv(msg, " (@INC contains:");
            for (i = 0; i <= AvFILL(ar); i++) {
                char *dir = SvPVx(*av_fetch(ar, i, TRUE), na);
-               sv_setpvf(dirmsgsv, "   %s\n ", dir);
+               sv_setpvf(dirmsgsv, " %s", dir);
                sv_catsv(msg, dirmsgsv);
            }
+           sv_catpvn(msg, ")", 1);
            SvREFCNT_dec(dirmsgsv);
            DIE("%_", msg);
        }
@@ -2406,7 +2411,8 @@ PP(pp_entereval)
        save_lines(GvAV(compiling.cop_filegv), linestr);
     PUTBACK;
     ret = doeval(gimme);
-    if (perldb && was != sub_generation) { /* Some subs defined here. */
+    if (perldb && was != sub_generation /* Some subs defined here. */
+       && ret != op->op_next) {        /* Successive compilation. */
        strcpy(safestr, "_<(eval )");   /* Anything fake and short. */
     }
     return DOCATCH(ret);