如何在Template Toolkit文件中找到错误的行?
How to find the line with the error in Template Toolkit files?
print $@
for template toolkit 不显示发生异常的行。如何找到错误的确切位置?
$ perl -Mstrict -Mwarnings -MTemplate -e 'my $template = Template->new({ABSOLUTE=>0}); $template->process("test.tt") || print $@, "\n"'
file error - /etc/hosts: absolute paths are not allowed (set ABSOLUTE option)
我没有看到 .tt
文件的哪一行导致了错误。这使得调试变得困难。
为什么TT不显示错误位置?这是难以实现的功能的固有问题吗?如果没有,为什么还没有实施?我应该提出错误报告来实现此功能吗?
是的,这是一个错误。感谢 reporting 它。
print $@
for template toolkit 不显示发生异常的行。如何找到错误的确切位置?
$ perl -Mstrict -Mwarnings -MTemplate -e 'my $template = Template->new({ABSOLUTE=>0}); $template->process("test.tt") || print $@, "\n"'
file error - /etc/hosts: absolute paths are not allowed (set ABSOLUTE option)
我没有看到 .tt
文件的哪一行导致了错误。这使得调试变得困难。
为什么TT不显示错误位置?这是难以实现的功能的固有问题吗?如果没有,为什么还没有实施?我应该提出错误报告来实现此功能吗?
是的,这是一个错误。感谢 reporting 它。