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: |
ken.russell [...] gmail.com
|
Cc: |
|
AdminCc: |
|
|
Severity: |
Normal |
Broken in: |
0.95 |
Fixed in: |
0.97_001 |
|
Thu Sep 01 16:29:36 2011
ken.russell [...] gmail.com - Ticket created
The validation of variables in HTML::Template::Compiled::Classic is
actually not backward compatible. It looks like this was previously
fixed in HTML::Template::Compiled but didn't make it's way into HTCC.
I've attached a patch that will fix it (although I suppose we could just
not override the existing validate_var function).
Thanks!
*** Classic.pm.orig Wed Apr 27 12:10:27 2011
--- Classic.pm Thu Sep 1 13:18:30 2011
***************
*** 23,30 ****
}
# returns if the var is valid
sub validate_var {
! return $_[1] !~ tr#a-zA-Z0-9._/-##c;
}
--- 23,33 ----
}
# returns if the var is valid
+ # HTML::Template allows every character
+ # although the documentation says it doesn't.
sub validate_var {
! return 1;
! # return $_[1] !~ tr#a-zA-Z0-9._/-##c;
}
Mon May 14 12:23:23 2012
TINITA [...] cpan.org - Correspondence added
Am Do 01. Sep 2011, 22:29:36, kenrussell schrieb:
Show quoted text> The validation of variables in HTML::Template::Compiled::Classic is
> actually not backward compatible. It looks like this was previously
> fixed in HTML::Template::Compiled but didn't make it's way into HTCC.
>
> I've attached a patch that will fix it (although I suppose we could
just
Show quoted text> not override the existing validate_var function).
>
> Thanks!
sorry for the late answer.
I fixed it in git. Will be in the next version, 0.97_001 or 0.98
Although HTML::Template has problems for example with:
<tmpl_var name="foo=>" >
But that's probably a parsing error.
thanks!
Mon May 14 12:23:23 2012
The RT System itself - Status changed from 'new' to 'open'
Thu May 17 16:05:20 2012
TINITA [...] cpan.org - Fixed in 0.97_001 added
Sat Dec 08 19:55:58 2012
TINITA [...] cpan.org - Status changed from 'open' to 'resolved'