diff options
author | Chip Salzenberg <chip@pobox.com> | 1998-03-03 04:39:49 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-03-03 04:39:49 +0000 |
commit | 93233ece75d8fe98a77377e72c4d6004c5ea8691 (patch) | |
tree | d9de53b8b818671b4e52497a2397cde5a6e8950e /gv.c | |
parent | 2c4aebbdec0f7c22369f4986d7cad0139e4dd272 (diff) | |
download | perl-93233ece75d8fe98a77377e72c4d6004c5ea8691.tar.gz |
[win32] merge problematic maintpatch to op.c
#77: "Eliminate double warnings under C<package;>"
Files: gv.c op.c toke.c
p4raw-id: //depot/win32/perl@641
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -530,7 +530,9 @@ gv_fetchpv(char *nambeg, I32 add, I32 sv_type) /* By this point we should have a stash and a name */ if (!stash) { - if (add) { + if (!add) + return Nullgv; + if (add & ~2) { char sv_type_char = ((sv_type == SVt_PV) ? '$' : (sv_type == SVt_PVAV) ? '@' : (sv_type == SVt_PVHV) ? '%' @@ -539,16 +541,15 @@ gv_fetchpv(char *nambeg, I32 add, I32 sv_type) warn("Global symbol \"%c%s\" requires explicit package name", sv_type_char, name); else - warn("Global symbol \"%s\" requires explicit package name", name); - ++error_count; - stash = curstash ? curstash : defstash; /* avoid core dumps */ - add_gvflags = ((sv_type == SVt_PV) ? GVf_IMPORTED_SV - : (sv_type == SVt_PVAV) ? GVf_IMPORTED_AV - : (sv_type == SVt_PVHV) ? GVf_IMPORTED_HV - : 0); + warn("Global symbol \"%s\" requires explicit package name", + name); } - else - return Nullgv; + ++error_count; + stash = curstash ? curstash : defstash; /* avoid core dumps */ + add_gvflags = ((sv_type == SVt_PV) ? GVf_IMPORTED_SV + : (sv_type == SVt_PVAV) ? GVf_IMPORTED_AV + : (sv_type == SVt_PVHV) ? GVf_IMPORTED_HV + : 0); } if (!SvREFCNT(stash)) /* symbol table under destruction */ |