'main' *is* a reserved word
Rafael Garcia-Suarez [Mon, 3 Sep 2001 22:55:41 +0000 (00:55 +0200)]
Message-ID: <20010903225541.A24097@rafael>

p4raw-id: //depot/perl@11861

toke.c

diff --git a/toke.c b/toke.c
index b78e19d..1ebd17b 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3996,7 +3996,7 @@ Perl_yylex(pTHX)
                    if (ckWARN(WARN_RESERVED)) {
                        if (lastchar != '-') {
                            for (d = PL_tokenbuf; *d && isLOWER(*d); d++) ;
-                           if (!*d)
+                           if (!*d && strNE(PL_tokenbuf,"main"))
                                Perl_warner(aTHX_ WARN_RESERVED, PL_warn_reserved,
                                       PL_tokenbuf);
                        }