This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make multiple #line’s update dblines in evals
authorFather Chrysostomos <sprout@cpan.org>
Sun, 6 Nov 2011 10:11:02 +0000 (02:11 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 6 Nov 2011 18:21:42 +0000 (10:21 -0800)
commitd1299d44cb6299d416c31fa3425359d9a2c5d7c3
tree4742f06660a230663d73fca5ce95a7da755a81d2
parent6bac172059b0ed213ca5326c1117d262ed34c1c1
Make multiple #line’s update dblines in evals

The array-copying stuff that happens when #line 3 "filename" is
encountered in a string eval is not sufficient.  If there are multiple
such statements, only the first one copies the debugger’s lines arrays
(@{"_<filename"}) into the new array.

Checking that CopFILESV(PL_curcop) begins with ‘(eval ’ is a bit
silly, since the parser already knows whether it’s processing a file
without having to check file names.  (And what if you have a real file
beginning with ‘(eval ’?)

See commit 8818d40 and others that it references, for the history of
this piece of code.
t/comp/retainedlines.t
toke.c