summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-01 19:44:44 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-01 19:44:44 +0000
commit4c32f29ba9da41e214e9e03a44a530ee0427f19a (patch)
treeea703e5487a8a500d4231f1d58a7d1441613a2ca /toke.c
parent3451b8f41d00bcd648d86872b906a29e6c9a3d51 (diff)
downloadperl-4c32f29ba9da41e214e9e03a44a530ee0427f19a.tar.gz
Retract #7941. Forbidding subs m/s/etc is too cruel because
that also breaks using them as methods. p4raw-id: //depot/perl@7943
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/toke.c b/toke.c
index c759650794..90b5ad5745 100644
--- a/toke.c
+++ b/toke.c
@@ -4888,8 +4888,6 @@ Perl_yylex(pTHX)
if (isIDFIRST_lazy_if(s,UTF) || *s == '\'' ||
(*s == ':' && s[1] == ':'))
{
- bool reserved = FALSE;
-
PL_expect = XBLOCK;
attrful = XATTRBLOCK;
/* remember buffer pos'n for later force_word */
@@ -4904,29 +4902,6 @@ Perl_yylex(pTHX)
}
s = skipspace(d);
have_name = TRUE;
- switch (tmpbuf[0]) {
- case 'm':
- case 's':
- case 'y':
- if (tmpbuf[1] == 0)
- reserved = TRUE;
- break;
- case 'q':
- if (tmpbuf[1] == 0 ||
- (strchr("qwxr", tmpbuf[1]) && tmpbuf[2] == 0))
- reserved = TRUE;
- break;
- case 't':
- if (tmpbuf[1] == 'r' && tmpbuf[2] == 0)
- reserved = TRUE;
- break;
- default:
- break;
- }
- if (reserved)
- Perl_croak(aTHX_
- "Subroutine name \"%s\" reserved for string operators",
- tmpbuf);
}
else {
if (key == KEY_my)