Subject: | TMPL_INCLUDE bug |
Date: | Fri, 1 Feb 2008 19:49:12 +0600 |
To: | bug-HTML-Template [...] rt.cpan.org |
From: | "Pavel V. Rochnyack" <rochnyack [...] ngs.ru> |
Hello.
HTML::Template template parser has a bug which appears as incorrect
search path for files, included by <TMPL_INCLUDE>.
HTML::Template is 2.9 version. Templates and script, used in
testing, attached.
I have following templates:
template.tmpl
common/top.tmpl
common/bottom.tmpl
Let`s look for my 4 situations.
1. All OK. When I open template.tmpl with content:
== cut ==
<tmpl_include "common/top.tmpl">
<TMPL_IF VAR>
<TMPL_VAR VAR>
</TMPL_IF>
<tmpl_include "bottom.tmpl">
== cut ==
H:T can find both bottom.tmpl and top.tmpl, and works as expected.
2. When I open template.tmpl with content:
== cut ==
<tmpl_include "common/top.tmpl">
<TMPL_IF VAR><TMPL_VAR VAR></TMPL_IF>
<tmpl_include "common/bottom.tmpl">
== cut ==
H:T can`t find bottom.tmpl, but finds top.tmpl as in 1 test.
3. when I open template.tmpl with content:
== cut ==
<tmpl_include "common/top.tmpl">
<tmpl_include "common/bottom.tmpl">
== cut ==
H:T can`t find bottom.tmpl, but finds top.tmpl.
4. When I open template.tmpl with content:
== cut ==
<tmpl_include "common/top.tmpl">
<tmpl_include "bottom.tmpl">
== cut ==
H:T can find both bottom.tmpl and top.tmpl, but it is incorrect
behaviour, because both files are in same directory.
--
Best regards,
Pavel mailto:rochnyack@ngs.ru
Message body not shown because it is not plain text.
Message body not shown because it is not plain text.