summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-24 03:03:05 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-24 03:03:05 +0000
commit5603f27d0c70bf36f089b5830eae87c6486f07bc (patch)
treef4700d3cb136b4b02c047a809a9bc6c21320d54c /toke.c
parent9675f7ac35061616b1770751dc4303671c1e0ebe (diff)
downloadperl-5603f27d0c70bf36f089b5830eae87c6486f07bc.tar.gz
minor logic tweak for reserved word warning
p4raw-id: //depot/perl@3451
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/toke.c b/toke.c
index 441839b12b..0105fe1265 100644
--- a/toke.c
+++ b/toke.c
@@ -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);
+ }
}
}