Re: use of lc module names and warnings
Rafael Garcia-Suarez [Sun, 12 May 2002 23:09:46 +0000 (01:09 +0200)]
Message-ID: <20020512230946.E699@rafael>

p4raw-id: //depot/perl@16606

toke.c

diff --git a/toke.c b/toke.c
index 7265fb0..7e9efdc 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -4047,7 +4047,7 @@ Perl_yylex(pTHX)
                    if (ckWARN(WARN_RESERVED)) {
                        if (lastchar != '-') {
                            for (d = PL_tokenbuf; *d && isLOWER(*d); d++) ;
-                           if (!*d && strNE(PL_tokenbuf,"main"))
+                           if (!*d && !gv_stashpv(PL_tokenbuf,FALSE))
                                Perl_warner(aTHX_ packWARN(WARN_RESERVED), PL_warn_reserved,
                                       PL_tokenbuf);
                        }