summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-11-06 10:55:36 -0800
committerFather Chrysostomos <sprout@cpan.org>2013-11-08 08:15:58 -0800
commit466112bb8d1a607f81f127e9641f40ce1164c3e7 (patch)
treef997493298d1683bbea0ded8a5f818372da4ae38 /toke.c
parente0707a4ad5fb4738da21729f352b9e3f6660ae1d (diff)
downloadperl-466112bb8d1a607f81f127e9641f40ce1164c3e7.tar.gz
toke.c: Remove dead code handling <FH> //
A few lines of code added by this commit: commit 6f33ba736d46c2f5bfdb2405fd09d82ec18a1d07 Author: Rafael Garcia-Suarez <rgarciasuarez@gmail.com> Date: Sun Aug 25 18:42:46 2002 +0000 Fix parsing problems with the // operator. Make // able to follow various unary operators used without arguments or parens (shift, pop, getc, pos, readline, readlink, undef, umask, and the filetest operators), as well as the <FH> operator. were already unreachable when they were added, specifically the code for handling // after <FH> (which is fortunate, because XTERMORDORDOR after <FH> would break <FH>+1). S_scan_inputsymbol sets pl_yylval.ival to OP_NULL, since it has already created the ops; it has done so since perl 5.000. So this branch is never reached when parsing <FH>. The if-block containing these lines has had ‘|| op_type == OP_READLINE’ since perl 5.000, which has also always been redundant for the same reason.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/toke.c b/toke.c
index 07730363c0..1b26d437d2 100644
--- a/toke.c
+++ b/toke.c
@@ -2588,7 +2588,7 @@ S_sublex_start(pTHX)
PL_lex_op = NULL;
return THING;
}
- if (op_type == OP_CONST || op_type == OP_READLINE) {
+ if (op_type == OP_CONST) {
SV *sv = tokeq(PL_lex_stuff);
if (SvTYPE(sv) == SVt_PVIV) {
@@ -2601,9 +2601,6 @@ S_sublex_start(pTHX)
}
pl_yylval.opval = (OP*)newSVOP(op_type, 0, sv);
PL_lex_stuff = NULL;
- /* Allow <FH> // "foo" */
- if (op_type == OP_READLINE)
- PL_expect = XTERMORDORDOR;
return THING;
}