In Backtrace§
See primary documentation in context for method outer-caller-idx.
method outer-caller-idx(Backtrace:D: Int $startidx)
Returns as a list the index of the frames that called the current one.
sub zipi { { { die "Something bad happened" }() }() }; try zipi; say $!.backtrace.outer-caller-idx( 4 ); # OUTPUT: «[6]»