This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Extreme paranoia
authorFather Chrysostomos <sprout@cpan.org>
Wed, 22 Aug 2012 22:59:23 +0000 (15:59 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 22 Aug 2012 22:59:41 +0000 (15:59 -0700)
toke.c

diff --git a/toke.c b/toke.c
index 48d4f3d..4997420 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -9715,7 +9715,9 @@ S_scan_heredoc(pTHX_ register char *s)
        /* s now points to the newline after the heredoc terminator.
           d points to the newline before the body of the heredoc.
         */
-       if (PL_sublex_info.re_eval_start) {
+       /* See the Paranoia note in case LEX_INTERPEND in yylex, for why we
+          check PL_sublex_info.re_eval_str. */
+       if (PL_sublex_info.re_eval_start || PL_sublex_info.re_eval_str) {
            /* Set aside the rest of the regexp */
            if (!PL_sublex_info.re_eval_str)
                PL_sublex_info.re_eval_str =