slurping an empty file should return '' rather than undef, with
[p5sagit/p5-mst-13.2.git] / gv.c
diff --git a/gv.c b/gv.c
index 727692b..a1e5073 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -107,7 +107,7 @@ gv_init(GV *gv, HV *stash, char *name, STRLEN len, int multi)
     GvSTASH(gv) = (HV*)SvREFCNT_inc(stash);
     GvNAME(gv) = savepvn(name, len);
     GvNAMELEN(gv) = len;
-    if (multi)
+    if (multi || doproto)              /* doproto means it _was_ mentioned */
        GvMULTI_on(gv);
     if (doproto) {                     /* Replicate part of newSUB here. */
        SvIOK_off(gv);
@@ -654,7 +654,6 @@ gv_fetchpv(char *nambeg, I32 add, I32 sv_type)
            }
        }
        break;
-#ifdef OVERLOAD
     case 'O':
         if (strEQ(name, "OVERLOAD")) {
             HV* hv = GvHVn(gv);
@@ -662,7 +661,6 @@ gv_fetchpv(char *nambeg, I32 add, I32 sv_type)
             hv_magic(hv, gv, 'A');
         }
         break;
-#endif /* OVERLOAD */
     case 'S':
        if (strEQ(name, "SIG")) {
            HV *hv;
@@ -1005,7 +1003,6 @@ register GV *gv;
 }
 #endif                 /* Microport 2.4 hack */
 
-#ifdef OVERLOAD
 /* Updates and caches the CV's */
 
 bool
@@ -1483,5 +1480,3 @@ amagic_call(SV *left, SV *right, int method, int flags)
     }
   }
 }
-#endif /* OVERLOAD */
-