Fix up problem with gv.c from change 477.
Malcolm Beattie [Fri, 6 Feb 1998 18:08:28 +0000 (18:08 +0000)]
Fix up Config.pm use in t/lib/ph.t from change 478.

p4raw-id: //depot/perl@484

gv.c
t/lib/ph.t

diff --git a/gv.c b/gv.c
index 9ef439b..3633e7b 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -428,9 +428,14 @@ gv_fetchpv(char *nambeg, I32 add, I32 sv_type)
                gvp = (GV**)hv_fetch(stash,tmpbuf,len,add);
                if (tmpbuf != autobuf)
                    Safefree(tmpbuf);
-
-               if (!gv || gv == (GV*)&sv_undef)
+               if (!gvp || *gvp == (GV*)&sv_undef)
                    return Nullgv;
+               gv = *gvp;
+
+                if (SvTYPE(gv) == SVt_PVGV)
+                    GvMULTI_on(gv);
+                else if (!add)
+                    return Nullgv;
                else
                    gv_init(gv, stash, nambeg, namend - nambeg, (add & 2));
 
index b225bf4..d0a48f6 100755 (executable)
@@ -4,8 +4,12 @@
 # just socket.ph and pals.
 #   -- Kurt Starsinic <kstar@isinet.com>
 
-use lib '../lib';
+BEGIN {
+    chdir 't' if -d 't';
+    @INC = '../lib';
+}
 
+use Config;
 
 # All the constants which Socket.pm tries to make available:
 my @possibly_defined = qw(