summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Pit <vpit@cpan.org>2023-03-26 17:29:54 +0200
committerVincent Pit <vpit@cpan.org>2023-03-26 17:29:57 +0200
commit06d56a7d75a0691e8cdc82f75841b4fcd5d8f7c9 (patch)
tree1578401d8ba9dff9a8e3067f1c45306764b8604b
parent2a6c48705317d18cf843a0a538e89f7a9e5d6ba2 (diff)
Work around test failures in t/64-uplevel-caller.t
This is probably related to the caller behaviour change re-re-introduced with core commit f6387cf.
-rw-r--r--t/64-uplevel-caller.t8
1 files changed, 6 insertions, 2 deletions
diff --git a/t/64-uplevel-caller.t b/t/64-uplevel-caller.t
index 50a44d7..575ed3d 100644
--- a/t/64-uplevel-caller.t
+++ b/t/64-uplevel-caller.t
@@ -12,14 +12,18 @@ sub callstack {
my $i = 1;
my @stack;
while (1) {
- my @c = $check_args ? do { package DB; caller($i++) }
- : caller($i++);
+ my @c = $check_args ? do {
+ my $frame = ("$]" >= 5.037_010) ? ($i + 1) : $i;
+ package DB;
+ caller($frame)
+ } : caller($i);
last unless @c;
if ($check_args) {
my $args = $c[4] ? [ @DB::args ] : undef;
push @c, $args;
}
push @stack, \@c;
+ ++$i;
}
return \@stack;
}