summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-12-23 22:48:10 -0800
committerFather Chrysostomos <sprout@cpan.org>2013-12-24 08:19:54 -0800
commitceaf124e025eb0db6ee6049129591ceec9f38b6e (patch)
tree7142504db2eac0f05726d2fdc467e2992ddaa809 /toke.c
parent5f42d1f26e3387cc85f8ac2f3b8131c06f7c9dd0 (diff)
downloadperl-ceaf124e025eb0db6ee6049129591ceec9f38b6e.tar.gz
Interpret do CORE() as do-file
a96df64385 inadvertently changed it. do-file is how it has alwas been interpreted, at least as far back as 5.000, as far as I can tell.
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 b146cdcb3f..ca306f1455 100644
--- a/toke.c
+++ b/toke.c
@@ -7891,7 +7891,8 @@ Perl_yylex(pTHX)
*PL_tokenbuf = '&';
d = scan_word(s, PL_tokenbuf + 1, sizeof PL_tokenbuf - 1,
1, &len);
- if (len && !keyword(PL_tokenbuf + 1, len, 0)) {
+ if (len && (len != 4 || strNE(PL_tokenbuf+1, "CORE"))
+ && !keyword(PL_tokenbuf + 1, len, 0)) {
d = SKIPSPACE1(d);
if (*d == '(') {
force_ident_maybe_lex('&');