Skip Menu |

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 112022
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: porton [...] narod.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: The line of erroneous INCLUDE is not shown
Date: Sun, 14 Feb 2016 20:25:24 +0200
To: bug-Template-Toolkit [...] rt.cpan.org
From: Victor Porton <porton [...] narod.ru>
For some particular kinds of errors, such as including an absolute path when ABSOLUTE option is turned off, TT does not show which template file and which its line the error occurred. $ cat test.ttĀ  [% INCLUDE "/etc/hosts" %] $ perl -Mstrict -Mwarnings -MTemplate -e 'my $template = Template- Show quoted text
>new({ABSOLUTE=>0}); $template->process("test.tt") || print $template- >error, "\n"'
file error - /etc/hosts: absolute paths are not allowed (set ABSOLUTE option) We see only "file error" and no indication of which file this error happened in. In the above toy example it is easy to locate the file and its line number, but in more advanced hierarchies of templates it may be hard to debug without seeing the line number.
Ticket migrated to github as https://github.com/abw/Template2/issues/133