This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
more issues with /(?{ ... <<EOF })/
authorDavid Mitchell <davem@iabyn.com>
Sun, 25 Dec 2016 20:14:41 +0000 (20:14 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sun, 25 Dec 2016 20:14:41 +0000 (20:14 +0000)
RT #130398

My recent fix for issues with  and /(?{...})/, v5.25.7-97-g98d5e3e,
broke Method-Signatures and possibly TryCatch.

This commit seems to fix them, but is based on observation rather
than any deep understanding of what's going on.

toke.c

diff --git a/toke.c b/toke.c
index 06a050e..7887907 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -939,7 +939,8 @@ Perl_lex_grow_linestr(pTHX_ STRLEN len)
     /* Is the lex_shared linestr SV the same as the current linestr SV?
      * Only in this case does re_eval_start need adjusting, since it
      * points within lex_shared->ls_linestr's buffer */
-    current = (linestr == PL_parser->lex_shared->ls_linestr);
+    current = (   !PL_parser->lex_shared->ls_linestr
+               || linestr == PL_parser->lex_shared->ls_linestr);
 
     bufend_pos = PL_parser->bufend - buf;
     bufptr_pos = PL_parser->bufptr - buf;