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!
Owner: |
Nobody in particular
|
Requestors: |
henrik [...] adapt.dk
|
Cc: |
|
AdminCc: |
|
|
Severity: |
Unimportant |
Broken in: |
(no value)
|
Fixed in: |
0.87 |
|
Wed Jul 11 06:44:19 2007
dbd.ingres [...] gmail.com - Ticket created
In the pod for HTML::Template::Compiled in the section:
FEATURES FROM HTML::TEMPLATE
You state that:
"query"
Has a bug (doesn't return parameters in included files)
This seems not to be the case (at least when use_query is set.
Thu Jul 12 02:48:13 2007
dbd.ingres [...] gmail.com - Correspondence added
The note in the documentation is (partially) correct.
Params in the included file are returned, but params in files included
in included files are not.
See:
henrik@henrik-laptop:~/htc$ cat t1.tmpl
<TMPL_VAR name="t1-start">
<TMPL_IF name="t1-include"><TMPL_INCLUDE name="t2.tmpl"></TMPL_IF>
<TMPL_VAR name="t1-end">
henrik@henrik-laptop:~/htc$ cat t2.tmpl
<TMPL_VAR name="t2-start">
<TMPL_IF name="t2-include"><TMPL_INCLUDE name="t3.tmpl"></TMPL_IF>
<TMPL_VAR name="t2-end">
henrik@henrik-laptop:~/htc$ cat t3.tmpl
<TMPL_VAR name="t3-start">
<TMPL_VAR name="t3-end">
henrik@henrik-laptop:~/htc$ cat t.pl
#!perl -w
use HTML::Template::Compiled;
use Data::Dumper;
HTML::Template::Compiled->UseQuery(1);
my $t=HTML::Template::Compiled->new(filename=>'t1.tmpl');
print Dumper($t->query);
henrik@henrik-laptop:~/htc$ perl t.pl
$VAR1 = 't1-start';
$VAR2 = 't2-start';
$VAR3 = 't3.tmpl';
$VAR4 = 't2-end';
$VAR5 = 't1-end';
henrik@henrik-laptop:~/htc$
$VAR3 is the name of the 3.rd level template not the param in template
t3.tmpl.
Thu Jul 12 02:48:15 2007
The RT System itself - Status changed from 'new' to 'open'
Mon Jul 23 16:48:09 2007
TINITA [...] cpan.org - Correspondence added
On Mi. 11. Jul. 2007, 06:44:19, HTOUG wrote:
Show quoted text> "query"
> Has a bug (doesn't return parameters in included files)
[...]
yes, the query method is broken for includes of includes.
i don't know if i can fix it already in 0.87. i'll try.
thanks for the report.
Tue Jul 31 13:05:47 2007
TINITA [...] cpan.org - Status changed from 'open' to 'resolved'