diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-24 03:03:05 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-24 03:03:05 +0000 |
commit | 5603f27d0c70bf36f089b5830eae87c6486f07bc (patch) | |
tree | f4700d3cb136b4b02c047a809a9bc6c21320d54c /toke.c | |
parent | 9675f7ac35061616b1770751dc4303671c1e0ebe (diff) | |
download | perl-5603f27d0c70bf36f089b5830eae87c6486f07bc.tar.gz |
minor logic tweak for reserved word warning
p4raw-id: //depot/perl@3451
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -3255,17 +3255,19 @@ int yylex(PERL_YYLEX_PARAM_DECL) TOKEN(NOAMP); } - if (PL_hints & HINT_STRICT_SUBS) - yylval.opval->op_private |= OPpCONST_STRICT; - /* Call it a bare word */ - bareword: - if (ckWARN(WARN_RESERVED)) { - if (lastchar != '-') { - for (d = PL_tokenbuf; *d && isLOWER(*d); d++) ; - if (!*d) - warner(WARN_RESERVED, PL_warn_reserved, PL_tokenbuf); + if (PL_hints & HINT_STRICT_SUBS) + yylval.opval->op_private |= OPpCONST_STRICT; + else { + bareword: + if (ckWARN(WARN_RESERVED)) { + if (lastchar != '-') { + for (d = PL_tokenbuf; *d && isLOWER(*d); d++) ; + if (!*d) + warner(WARN_RESERVED, PL_warn_reserved, + PL_tokenbuf); + } } } |