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: 17851
Status: resolved
Worked: 15 min
Priority: 0/
Queue: HTML-Template-Compiled

People
Owner: TINITA [...] cpan.org
Requestors: jan [...] willamowius.de
Cc:
AdminCc:

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



Subject: Small compatibility bug
In HTML::Template 2.7 using parameters that have never been set evaluates to FALSE. In HTML::Template::Compiled 0.59 unset parameters evaluate to some hash and are thus TRUE.
Can you please provide a small example reproducing the bug? thanks, tina
Subject: Re: [rt.cpan.org #17851] Small compatibility bug
Date: Mon, 3 Apr 2006 19:59:25 +0200
To: bug-HTML-Template-Compiled [...] rt.cpan.org
From: Jan Willamowius <jan [...] willamowius.de>
It only seems to happen when global_vars is set: Program: #!/usr/bin/perl use HTML::Template::Compiled; my $tmpl = HTML::Template::Compiled->new(filename => 'tmpl_bug.tmpl', global_vars => 1); print $tmpl->output(); Template: <TMPL_IF neverset>True<TMPL_ELSE>False</TMPL_IF> <TMPL_VAR neverset> HTML::Template will simply print "False" while HTML::Template::Compiled prints "True" and a hash. Regards, Jan via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=17851 > > > Can you please provide a small example reproducing the bug? > thanks, tina >
-- Jan Willamowius, jan@willamowius.de, http://www.willamowius.de/
On Mo. 03. Apr. 2006, 13:59:57, jan@willamowius.de wrote: Show quoted text
> It only seems to happen when global_vars is set:
[...] thanks! i fixed it; it will be fixed in version 0.61 alternatevily you can download http://cvs.sourceforge.net/viewcvs.py/htcompiled/HTML-Template-Compiled/ lib/HTML/Template/Compiled.pm 1.131