Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pp_hot.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,11 @@ PP(pp_unstack)
if (!(PL_op->op_flags & OPf_SPECIAL)) {
assert(CxTYPE(cx) == CXt_BLOCK || CxTYPE_is_LOOP(cx));
CX_LEAVE_SCOPE(cx);
/* PL_curcop points somewhere inside this loop body.
* Unless it is reset, any warnings, errors, or caller()
* lookups inside the loop condition will display a
* misleading line number. */
PL_curcop = cx->blk_oldcop;
}
return NORMAL;
}
Expand Down
6 changes: 3 additions & 3 deletions t/lib/warnings/9uninit
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ EXPECT
Use of uninitialized value $undef in numeric eq (==) at - line 4.
Use of uninitialized value $undef in numeric eq (==) at - line 5.
########
# TODO long standing bug - conditions of while loops
# NAME conditions of while loops
use warnings;

my $c;
Expand All @@ -1480,7 +1480,7 @@ EXPECT
Use of uninitialized value $c in numeric eq (==) at - line 5.
Use of uninitialized value $c in numeric eq (==) at - line 5.
########
# TODO long standing bug - conditions of until loops
# NAME conditions of until loops
use warnings;

my $c;
Expand All @@ -1496,7 +1496,7 @@ EXPECT
Use of uninitialized value $c in numeric eq (==) at - line 5.
Use of uninitialized value $c in numeric eq (==) at - line 5.
########
# TODO long standing bug - conditions of for loops
# NAME conditions of for loops
use warnings;

my $c;
Expand Down
2 changes: 1 addition & 1 deletion t/run/switches.t
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ while (<>) {
print "ok\n";
CODE
$code =~ s/tmpinplace/$tmpinplace/;
fresh_perl_like($code, qr/^Cannot complete in-place edit of \Q$tmpinplace\E\/foo: .* - line 5, <> line \d+\./, { },
fresh_perl_like($code, qr/^Cannot complete in-place edit of \Q$tmpinplace\E\/foo: .* - line 3, <> line \d+\./, { },
"chdir while in-place editing (no at-functions)");
}

Expand Down
Loading