This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
'main' *is* a reserved word
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 3 Sep 2001 22:55:41 +0000 (00:55 +0200)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 4 Sep 2001 12:48:14 +0000 (12:48 +0000)
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);
                        }