From: Malcolm Beattie Date: Fri, 6 Feb 1998 18:08:28 +0000 (+0000) Subject: Fix up problem with gv.c from change 477. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0d97519653b39d2432704118e29dad7e033546b5;p=p5sagit%2Fp5-mst-13.2.git Fix up problem with gv.c from change 477. Fix up Config.pm use in t/lib/ph.t from change 478. p4raw-id: //depot/perl@484 --- diff --git a/gv.c b/gv.c index 9ef439b..3633e7b 100644 --- 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)); diff --git a/t/lib/ph.t b/t/lib/ph.t index b225bf4..d0a48f6 100755 --- a/t/lib/ph.t +++ b/t/lib/ph.t @@ -4,8 +4,12 @@ # just socket.ph and pals. # -- Kurt Starsinic -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(