chdir 't';
}
-print "1..159\n";
+print "1..165\n";
sub failed {
my ($got, $expected, $name) = @_;
s//<<EOV/e if 0;
EOV
check_line(535, 'after here-doc in quotes');
-<<EOW;
+<<EOW; <<EOX;
${check_line(537, 'first line of interp in here-doc');;
check_line(538, 'second line of interp in here-doc');}
EOW
+${check_line(540, 'first line of interp in second here-doc on same line');;
+ check_line(541, 'second line of interp in second heredoc on same line');}
+EOX
+eval <<'EVAL';
+#line 545
+"${<<EOY; <<EOZ}";
+${check_line(546, 'first line of interp in here-doc in quotes in eval');;
+ check_line(547, 'second line of interp in here-doc in quotes in eval');}
+EOY
+${check_line(549, '1st line of interp in 2nd hd, same line in q in eval');;
+ check_line(550, '2nd line of interp in 2nd hd, same line in q in eval');}
+EOZ
+EVAL
time
#line 42
PL_lex_starts = 0;
PL_lex_state = LEX_INTERPCONCAT;
if (is_heredoc)
- CopLINE_inc(PL_curcop);
+ CopLINE_set(PL_curcop, (line_t)PL_multi_start);
PL_copline = NOLINE;
Newxz(shared, 1, LEXSHARED);
char *e;
char *peek;
const bool infile = PL_rsfp || PL_parser->filtered;
+ const line_t origline = CopLINE(PL_curcop);
LEXSHARED *shared = PL_parser->lex_shared;
#ifdef PERL_MAD
I32 stuffstart = s - SvPVX(PL_linestr);
SvIV_set(tmpstr, '\\');
}
- PL_multi_start = CopLINE(PL_curcop) + 1;
+ PL_multi_start = origline + 1;
PL_multi_open = PL_multi_close = '<';
/* inside a string eval or quote-like operator */
if (!infile || PL_lex_inwhat) {
s = (char*)memchr((void*)s, '\n', PL_bufend - s);
assert(s);
}
+ PL_multi_start += shared->herelines;
linestr = shared->ls_linestr;
bufend = SvEND(linestr);
d = s;
{
SV *linestr_save;
streaming:
+ PL_multi_start += shared->herelines;
sv_setpvs(tmpstr,""); /* avoid "uninitialized" warning */
term = PL_tokenbuf[1];
len--;
#endif
PL_bufptr = PL_bufend;
CopLINE_set(PL_curcop,
- PL_multi_start + shared->herelines);
+ origline + 1 + shared->herelines);
if (!lex_next_chunk(LEX_NO_TERM)
&& (!SvCUR(tmpstr) || SvEND(tmpstr)[-1] != '\n')) {
SvREFCNT_dec(linestr_save);
goto interminable;
}
- CopLINE_set(PL_curcop, (line_t)PL_multi_start - 1);
+ CopLINE_set(PL_curcop, origline);
if (!SvCUR(PL_linestr) || PL_bufend[-1] != '\n') {
s = lex_grow_linestr(SvLEN(PL_linestr) + 3);
/* ^That should be enough to avoid this needing to grow: */
interminable:
SvREFCNT_dec(tmpstr);
- CopLINE_set(PL_curcop, (line_t)PL_multi_start - 1);
+ CopLINE_set(PL_curcop, origline);
missingterm(PL_tokenbuf + 1);
}