Skip Menu |

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

Maintainer(s)' notes

Note: there is a bug with caching and TMPL_INCLUDE_VAR since 0.97_004 until 0.98. either use an earlier version or upgrade to 0.98_001. Another workaround is to precompile all templates to file_cache_dir. The bug happens when including a template via INCLUDE_VAR and the template is not yet compiled or has changed.

I'm sorry if the change about aliases came quite unannounced. I didn't expect any problems since dollar signs are not allowed in template vars, but I heard from at least one case where people were doing exactly this.
Please do not use unallowed characters in template vars. Allowed are (from the HTML::Template::FAQ): Numbers, letters, '.', '/', '+', '-' and '_'.
This should work in HTML::Template::Compiled::Classic.
in HTML::Template::Compiled you should be only using numbers, letters and _.
The dot, for example, is special. If you need to get a hash key from the template parameters with special charcaters, you can try <tmpl_var _.$var$name$with$dollars >

There will be a workaround in the next version:
local $HTML::Template::Compiled::Compiler::DISABLE_NEW_ALIAS = 1;


Please report any bug you find.
The code is now hosted on https://github.com/perlpunk/HTML-Template-Compiled
If you have a bug report, you can also post it there in the "Issues" section.
In the bugreport, please include, if possible, the module version, perl version and a testcase that reproduces the error; that makes it easier to find the bug.

The issue with not reloading includes of includes should be fixed in version 0.95_003. If you have any problems though please report!

Using query() and the dot syntax might not work together always. If you have a tmpL_var name="..foo" (going up the stash one level) the var foo is not detected and will not be reported by the query() function. Since the dot syntax is for dereferencing hashes and method calls the query function might not make sense anyway. I believe it is a bad idea to let the program do things if the template is using a certain variable.

Thanks!

Report information
The Basics
Id: 47227
Status: resolved
Priority: 0/
Queue: HTML-Template-Compiled

People
Owner: Nobody in particular
Requestors: STEFFENW [...] cpan.org
Cc: volker.voit [...] googlemail.com
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.90
  • 0.93
Fixed in: 0.97_004



CC: volker.voit [...] googlemail.com
Subject: <TMPL_NOPARSE> and a POD error
Within a <TMPL_NOPARSE> section the occurance of half template-tags confuse the parser. Once such a "half" template-tag is found, the template will not be parsed until its end (see script 2/3). When there is a complete template-tag there are no problems. Another thing is a minor error in the pod: Section tagstyles; own defined tags: [ qr({{), start of opening tag qr(}}), # end of opening tag qr({{/), # start of closing tag qr(}}), # end of closing tag ] There should be a comment-sign in front of ‘start of opening tag‘. Script 1: okay use strict; use warnings; use HTML::Template::Compiled 0.93; my $htc = HTML::Template::Compiled->new( tagstyle => [qw(-classic -comment +asp)], scalarref => \<<'EOT'); <%NOPARSE%><%= test%><%/NOPARSE%><%= test%> EOT $htc->param(test=>'ttt'); print $htc->output(); __END__ <%= test%>ttt Script2: not okay use strict; use warnings; use HTML::Template::Compiled 0.93; my $htc = HTML::Template::Compiled->new( tagstyle => [qw(-classic -comment +asp)], scalarref => \<<'EOT'); <%NOPARSE%><%= <%/NOPARSE%><%= test%> EOT $htc->param(test=>'ttt'); print $htc->output(); __END__ <%= <%/NOPARSE%><%= test%> Script 3: not okay (doesn´t matter if asp or classic tagstyle) use strict; use warnings; use HTML::Template::Compiled 0.93; my $htc = HTML::Template::Compiled->new( scalarref => \<<'EOT'); <TMPL_NOPARSE><TMPL_VAR </TMPL_NOPARSE><TMPL_VAR test> EOT $htc->param(test=>'ttt'); print $htc->output(); __END__ <TMPL_VAR </TMPL_NOPARSE><TMPL_VAR test>
On Mo. 22. Jun. 2009, 03:05:56, STEFFENW wrote: Show quoted text
> Within a <TMPL_NOPARSE> section the occurance of half template-tags > confuse the parser. Once such a "half" template-tag is found, the > template will not be parsed until its end (see script 2/3).
thanks, yes, that's a bug, because the intention of NOPARSE is that it could contain invalid template code. The same error happens with comment tags. I'm working on it. Show quoted text
> > When there is a complete template-tag there are no problems. > > Another thing is a minor error in the pod:
[...] thanks, fixed in 0.93_001 regards, tina
Am Sa 11. Jul 2009, 18:20:36, TINITA schrieb: Show quoted text
> On Mo. 22. Jun. 2009, 03:05:56, STEFFENW wrote:
> > Within a <TMPL_NOPARSE> section the occurance of half template-tags > > confuse the parser. Once such a "half" template-tag is found, the > > template will not be parsed until its end (see script 2/3).
> > thanks, yes, that's a bug, because the intention of NOPARSE is that it > could contain invalid template code. The same error happens with > comment tags. > I'm working on it.
well, finally I found time for this and fixed it. will be in the next version, thank you!