On Tue, Mar 7, 2017 at 11:30 PM, ToddAndMargo <toddandma...@zoho.com
<mailto:toddandma...@zoho.com>> wrote:
Hi All,
I am trying to print out the name of the sub I am in.
Reference:
https://docs.perl6.org/language/variables#index-entry-%26%3FROUTINE
<https://docs.perl6.org/language/variables#index-entry-%26%3FROUTINE>
&?ROUTINE Which routine am I in?
<code>
sub LinuxCheck () { print &?ROUTINE ~ " " ~ "$*DISTRO $OS\n"; }
</code>
<unit> rhel linux
&?ROUTINE resolves to "<unit>", which is not the name of the sub.
What am I missing?
Many thanks,
-T
On 03/07/2017 11:42 PM, Brent Laabs wrote:
Try &?ROUTINE.name -- that should get you the sub's name.
Hi Brent,
Still prints "<unit>". Rats!
Thank you for the help!
-T