如何在 Perl 中获得回溯?
可能的重复:
如何强制堆栈Perl 中所有致命错误的回溯?
我喜欢 Python 的原因之一是,当脚本因错误而退出时,它会输出回溯。我想知道有没有办法让 Perl 也能做到这一点?
Possible Duplicate:
How do I force a stack backtrace for all fatal errors in Perl?
One of the things I like about Python, is that when a script exits because of an error, it spits out a traceback. I'm wondering is there anyway of getting a Perl to do this as well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将其添加到脚本的顶部:
它将创建所有致命错误的堆栈跟踪。
Add this to the top of your script:
It will create a stack trace on all fatal errors.
研究 Carp::Always 模块。
Investigate the Carp::Always module.