squelch undef warnings
[p5sagit/p5-mst-13.2.git] / pp_ctl.c
index 48a2ed2..87e399a 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1874,10 +1874,21 @@ PP(pp_goto)
            I32 items = 0;
            I32 oldsave;
 
+       retry:
            if (!CvROOT(cv) && !CvXSUB(cv)) {
-               if (CvGV(cv)) {
-                   SV *tmpstr = sv_newmortal();
-                   gv_efullname3(tmpstr, CvGV(cv), Nullch);
+               GV *gv = CvGV(cv);
+               GV *autogv;
+               if (gv) {
+                   SV *tmpstr;
+                   /* autoloaded stub? */
+                   if (cv != GvCV(gv) && (cv = GvCV(gv)))
+                       goto retry;
+                   autogv = gv_autoload4(GvSTASH(gv), GvNAME(gv),
+                                         GvNAMELEN(gv), FALSE);
+                   if (autogv && (cv = GvCV(autogv)))
+                       goto retry;
+                   tmpstr = sv_newmortal();
+                   gv_efullname3(tmpstr, gv, Nullch);
                    DIE("Goto undefined subroutine &%s",SvPVX(tmpstr));
                }
                DIE("Goto undefined subroutine");
@@ -2369,20 +2380,20 @@ sv_compile_2op(SV *sv, OP** startop, char *code, AV** avp)
     PL_hints = 0;
 
     PL_op = &dummy;
-    PL_op->op_type = 0;                        /* Avoid uninit warning. */
+    PL_op->op_type = OP_ENTEREVAL;
     PL_op->op_flags = 0;                       /* Avoid uninit warning. */
     PUSHBLOCK(cx, CXt_EVAL, SP);
     PUSHEVAL(cx, 0, PL_compiling.cop_filegv);
     rop = doeval(G_SCALAR, startop);
-    POPBLOCK(cx,PL_curpm);
     POPEVAL(cx);
+    POPBLOCK(cx,PL_curpm);
 
     (*startop)->op_type = OP_NULL;
     (*startop)->op_ppaddr = ppaddr[OP_NULL];
     lex_end();
     *avp = (AV*)SvREFCNT_inc(PL_comppad);
     LEAVE;
-    if (curcop = &PL_compiling)
+    if (PL_curcop == &PL_compiling)
        PL_compiling.op_private = PL_hints;
 #ifdef OP_IN_REGISTER
     op = PL_opsave;
@@ -2675,7 +2686,7 @@ PP(pp_require)
        RETPUSHUNDEF;
     }
     else
-       errno = 0;
+       SETERRNO(0, SS$_NORMAL);
 
     /* Assume success here to prevent recursive requirement. */
     (void)hv_store(GvHVn(PL_incgv), name, strlen(name),