Subject: | Template variables must be lowercase |
Date: | Sat, 14 Mar 2015 13:44:44 -0400 |
To: | <bug-Template-Tiny [...] rt.cpan.org> |
From: | "David Clarke" <david_clarke [...] verizon.net> |
Template::Tiny variable substitution only supports lowercase variables.
my $template = Template::Tiny->new(
TRIM => 1,
);
$template->process( \<<'END_TEMPLATE', { Foo => 'World' } );
Hello [% Foo %]!
END_TEMPLATE
Prints
Hello [% Foo %]!
I looked at the code, and it seems like the regex on line 11 is the problem:
my $EXPR = qr/ [a-z_][\w.]* /xs;
should be
my $EXPR = qr/ [A-Za-z_][\w.]* /xs;
Dave Clarke dclarke@cpan.org