summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-12 03:45:27 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-12 03:45:27 +0000
commit6798c92bb7a17a5333f2eeaaadd5e3c017b4529a (patch)
tree565592b87648e08a4a5d31eb3578cb2ee25be8a1 /toke.c
parent6b7c0e6edcea00cbbde34f695354b0ec1ee0e05b (diff)
downloadperl-6798c92bb7a17a5333f2eeaaadd5e3c017b4529a.tar.gz
Larry's patch to disallow CORE::Snark, with perldiag entry
p4raw-id: //depot/perl@5671
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 2e6120d731..817747630c 100644
--- a/toke.c
+++ b/toke.c
@@ -3958,7 +3958,8 @@ Perl_yylex(pTHX)
s += 2;
d = s;
s = scan_word(s, PL_tokenbuf, sizeof PL_tokenbuf, FALSE, &len);
- tmp = keyword(PL_tokenbuf, len);
+ if (!(tmp = keyword(PL_tokenbuf, len)))
+ Perl_croak(aTHX_ "CORE::%s is not a keyword", PL_tokenbuf);
if (tmp < 0)
tmp = -tmp;
goto reserved_word;