summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-08-20 14:55:09 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-08-21 14:11:02 -0700
commit043cc6c601c03ac1644cea26a20b39eb34957445 (patch)
treed460ea31424c8d44bd08002fba09ba7f37a334df /perl.h
parent565b52dfca4375468541e36d53e8a2aba372c056 (diff)
downloadperl-043cc6c601c03ac1644cea26a20b39eb34957445.tar.gz
here-doc in quotes in multiline s//.../e in eval
When <<END occurs on the last line of a quote-like operator inside a string eval ("${\<<END}"), it peeks into the linestr buffer of the parent lexing scope (quote-like operators start a new lexing scope with the linestr buffer containing what is between the quotes) to find the body of the here-doc. It modifies that buffer, stealing however much it needs. It was not leaving things in the consistent state that s///e checks for when it finishes parsing the replacement (to make sure s//}+{/ doesn’t ‘work’). Specifically, it was not shrinking the parent buf- fer, so when PL_bufend was reset in sublex_done to the end of the par- ent buffer, it was pointing to the wrong spot.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl.h b/perl.h
index 47f642f1cf..ed9889ef48 100644
--- a/perl.h
+++ b/perl.h
@@ -3450,7 +3450,7 @@ struct _sublex_info {
U16 sub_inwhat; /* "lex_inwhat" to use */
OP *sub_op; /* "lex_op" to use */
char *super_bufptr; /* PL_parser->bufptr that was */
- char *super_bufend; /* PL_parser->bufend that was */
+ SV *super_linestr; /* PL_parser->linestr that was */
char *re_eval_start;/* start of "(?{..." text */
};