From: Spider Boardman Date: Sun, 29 Aug 1999 19:04:53 +0000 (-0400) Subject: [ID 19990829.004] Autoloaded &VERSION and UNIVERSAL::VERSION X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d4bea2fb9d94a2ce4ff340ae9eab604f38ab2d31;p=p5sagit%2Fp5-mst-13.2.git [ID 19990829.004] Autoloaded &VERSION and UNIVERSAL::VERSION To: perl5-porters@perl.org don't mix Message-Id: <199908292304.TAA13738@Orb.Nashua.NH.US> p4raw-id: //depot/cfgperl@4051 --- diff --git a/universal.c b/universal.c index 032a536..f7d7942 100644 --- a/universal.c +++ b/universal.c @@ -197,7 +197,7 @@ XS(XS_UNIVERSAL_VERSION) gvp = pkg ? (GV**)hv_fetch(pkg,"VERSION",7,FALSE) : Null(GV**); - if (gvp && (gv = *gvp) != (GV*)&PL_sv_undef && (sv = GvSV(gv))) { + if (gvp && isGV(gv = *gvp) && SvOK(sv = GvSV(gv))) { SV *nsv = sv_newmortal(); sv_setsv(nsv, sv); sv = nsv;