&?routine &?ROUTINE

Documentation for &?routine &?ROUTINE, assembled from the following types:

language documentation Variables

From Variables

(Variables) &?routine &?ROUTINE

Which routine am I in? Has method .name

sub awesome-sub { say &?ROUTINE.name }
awesome-sub # OUTPUT: awesome-sub 
for '.' {
    .Str.say when !.IO.d;
    .IO.dir()».&?BLOCK when .IO.d # lets recurse a little! 
}

Other compile-time variables:

$?PACKAGE Which package am I in?
$?MODULE Which module am I in?
$?CLASS Which class am I in? (as variable)
$?ROLE Which role am I in? (as variable)
$?GRAMMAR Which grammar am I in?
$?TABSTOP How many spaces is a tab in a heredoc or virtual margin?
$?LF What "\n" signifies: LF, CR or CRLF (see the L<newline pragma|/language/pragmas>)
$?ENC Default encoding of Str.encode/Buf.decode/various IO methods.