strings (caused bogus line numbers in diagnostics and debugger)
p4raw-id: //depot/perl@2242
########
# pp_ctl.c
use warning 'unsafe' ;
-{ eval "last" }
+{ eval "last;" }
print STDERR $@ ;
EXPECT
Exiting eval via last at (eval 1) line 1.
########
# pp_ctl.c
use warning 'unsafe' ;
-joe: { eval "last joe" }
+joe: { eval "last joe;" }
print STDERR $@ ;
EXPECT
-Exiting eval via last at (eval 1) line 2.
+Exiting eval via last at (eval 1) line 1.
########
# pp_ctl.c
use warning 'unsafe' ;
########
# toke.c
use warning 'unsafe' ;
+#line 25 "bar"
$a = FRED:: ;
EXPECT
-Bareword "FRED::" refers to nonexistent package at - line 3.
+Bareword "FRED::" refers to nonexistent package at bar line 25.
########
# toke.c
use warning 'ambiguous' ;
########
# toke.c
use warning 'utf8' ;
-$_ = " \x{123} " ;
+eval <<'EOE';
+{
+#line 30 "foo"
+ $_ = " \x{123} " ;
+}
+EOE
EXPECT
-Use of \x{} without utf8 declaration at - line 3.
+Use of \x{} without utf8 declaration at foo line 30.
########
# toke.c
use warning 'utf8' ;
}
for (;;) {
STRLEN prevlen;
- while (s < PL_bufend && isSPACE(*s))
- s++;
+ while (s < PL_bufend && isSPACE(*s)) {
+ if (*s++ == '\n' && PL_in_eval && !PL_rsfp)
+ incline(s);
+ }
if (s < PL_bufend && *s == '#') {
while (s < PL_bufend && *s != '\n')
s++;
- if (s < PL_bufend)
+ if (s < PL_bufend) {
s++;
+ if (PL_in_eval && !PL_rsfp) {
+ incline(s);
+ continue;
+ }
+ }
}
if (s < PL_bufend || !PL_rsfp || PL_lex_state != LEX_NORMAL)
return s;