diff options
author | Lukas Mai <l.mai@web.de> | 2017-09-08 11:21:58 +0200 |
---|---|---|
committer | Lukas Mai <l.mai@web.de> | 2017-09-08 11:21:58 +0200 |
commit | ae59d0fba73f3a4b9f082a26fad09e6cb2553dd2 (patch) | |
tree | f99e2b28d3e630c7e4ff90347ef2b154ce4f0a3c /toke.c | |
parent | 14795193793753d71ffd287b58817b8fa0d8be76 (diff) | |
download | perl-ae59d0fba73f3a4b9f082a26fad09e6cb2553dd2.tar.gz |
simplify s///eee lexing logic
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -9721,18 +9721,14 @@ S_scan_subst(pTHX_ char *start) PL_multi_end = 0; pm->op_pmflags |= PMf_EVAL; - while (es-- > 0) { - if (es) - sv_catpvs(repl, "eval "); - else - sv_catpvs(repl, "do "); - } - sv_catpvs(repl, "{"); + for (; es > 1; es--) { + sv_catpvs(repl, "eval "); + } + sv_catpvs(repl, "do {"); sv_catsv(repl, PL_parser->lex_sub_repl); sv_catpvs(repl, "}"); SvREFCNT_dec(PL_parser->lex_sub_repl); PL_parser->lex_sub_repl = repl; - es = 1; } |