diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-01-24 07:09:05 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-01-24 07:09:05 +0000 |
commit | 1875ffd79b5d40eef9919d3285c217ef3635e812 (patch) | |
tree | e3d8290ac66596412b09d9caf0e1eba1edb41e05 /toke.c | |
parent | ee4d903cc41711efc019efd25339b39970bad65c (diff) | |
parent | ea95c1407851ede0a28b53a77da0cb2fc072454d (diff) | |
download | perl-1875ffd79b5d40eef9919d3285c217ef3635e812.tar.gz |
integrate cfgperl changes into mainline
p4raw-id: //depot/perl@2695
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -822,10 +822,15 @@ sublex_done(void) if (SvCOMPILED(PL_lex_repl)) { PL_lex_state = LEX_INTERPNORMAL; PL_lex_starts++; + /* we don't clear PL_lex_repl here, so that we can check later + whether this is an evalled subst; that means we rely on the + logic to ensure sublex_done() is called again only via the + branch (in yylex()) that clears PL_lex_repl, else we'll loop */ } - else + else { PL_lex_state = LEX_INTERPCONCAT; - PL_lex_repl = Nullsv; + PL_lex_repl = Nullsv; + } return ','; } else { @@ -1845,6 +1850,11 @@ int yylex(PERL_YYLEX_PARAM_DECL) PL_lex_state = LEX_INTERPCONCAT; return ')'; } + if (PL_lex_inwhat == OP_SUBST && PL_lex_repl && SvCOMPILED(PL_lex_repl)) { + if (PL_bufptr != PL_bufend) + croak("Bad evalled substitution pattern"); + PL_lex_repl = Nullsv; + } /* FALLTHROUGH */ case LEX_INTERPCONCAT: #ifdef DEBUGGING |