Subject: | Fixes for two bugs in HTML::Template::Compiled 0.93 |
Date: | Tue, 24 Feb 2009 17:11:36 -0800 |
To: | bug-HTML-Template-Compiled [...] rt.cpan.org |
From: | James Marshall <JMarshall [...] omniture.com> |
Hi Tinita,
We've been using HTML::Template and are looking forward to moving to
HTML::Template::Compiled, for speed and new features-- looks great!
While making the transition, I found a couple of bugs in HTC and
managed to fix them. They are:
1) Single-quoted strings in attributes aren't handled correctly.
Patch for Parser.pm:
581c581
< if ($arg->{template} =~ s{^ (\s* (['"]) ([^"]+) \2 \s*) }{}x) {
---
Show quoted text
> if ($arg->{template} =~ s{^ (\s* (['"]) (.+?) \2 \s*) }{}xs) {
2) When case_sensitive is off, non-uppercase-named variables aren't
retrieved correctly. Patch for Compiler.pm:
320c320
< $code = "\$t->try_global($varname, '$p')";
---
Show quoted text > $code = "\$t->try_global($varname, '$path')";
Thanks very much for the software! Let me know if I can provide
anything else, like test cases.
Cheers,
James