develooper Front page | perl.perl6.users | Postings from May 2018

What is my sub?

Thread Next
May 22, 2018 06:05
What is my sub?
Message ID:
Hi All,

I need to know the name of the subroutine I am in.

This is the way I use to do it in Perl 5:

          (my $Name = (caller(0))[3] ) ~~ s{.*::}{};

How do I do it in Perl 6?

Many thanks,

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About