-
Hello
Thank you for the great module!
It will be very useful to have Text::Xslate->new(wrapper => ['filename',...])
(like http://template-toolkit.org/docs/manual/Config.html#section_WRAPPER)
Best …
-
I need more readable error message for undefined function.
e.g. "Xslate(:1 &main[2]): Undefined subroutine &unknown called" is even better.
% xslate --eval "[% unknown() %]" --syntax TTerse
Xslat…
-
% perl -e 'use Text::Xslate; Text::Xslate->new(syntax => "TTerse")->render_string("[% x(1 %]")'
Xslate::Parser(:1): Expected ")" but found ";", near 1 while parsing templates at -e line 1
wtf? whe…
-
example:
perl -MText::Xslate -MEncode -e '$tx=Text::Xslate->new;print encode("utf8", $tx->render_string(decode("utf8", q{{"ほげ"} :>ほげ}))), qq{\n}'
output
> ã»ãほげ
nihen updated
14 years ago
-
% xslate --eval "[% FOR x IN [1,2,3] %][% x %][% END %]" --syntax TTerse
Xslate::Parser(:1): Unknown operator ']', near '3' while parsing templates at /usr/local/app/perl-5.12.1/bin//xslate line 107…
-
perl -E 'use Text::Xslate; say Text::Xslate->new(syntax => "TTerse")->render_string("[% x.$k %]", {x=>{v=>3.14}, k=>"v"})'
I want to fetch the value of hashref.
-
following template contains typo, but TTerse doesn't detect it.
use Text::Xslate;
my $x = Text::Xslate->new(syntax => 'TTerse');
print $x->render_string(q{[% INCLUDE "include/foo.tx' %][% 3 + 2 %]}…
-
[%- SET lang = "TTerse" -%]
[%- MACRO foo BLOCK -%]
[% lang %]
[% END %]
[%- foo() -%]
Result: Xslate(:3 &foo[11]): Too few arguments for foo
but the first line is commented out, it works.