In Backtrace::Frame§

See primary documentation in context for method subname

method subname(Backtrace::Frame:D --> Str)

Returns the name of the enclosing subroutine.

my $bt = Backtrace.new;
my $btf = $bt[0];
say $btf.subname;