我编写了一个Perl API,它被团队中的许多程序使用.我想跟踪调用我的API方法的所有程序.我想要像下面这样的东西
debug("The calling method is ", $XXXX);
Run Code Online (Sandbox Code Playgroud)
如何获得$ XXXX?
hob*_*bbs 10
print "The calling function is", (caller 1)[3], "\n";
Run Code Online (Sandbox Code Playgroud)