dgaramond2 has asked for the wisdom of the Perl Monks concerning the following question:
Basically I'm putting translatable text in the template and I want to pull the translations from the database in one go instead of one by one.my $config = {INTERPOLATE=>0, EVAL_PERL=>0}; my $template = Template->new($config); my $text = "[% var1 %] [% var2 %] [% var3 %]"; my $vars = $template->get_vars(\$text); # vars will contain ['var1', 'var2', 'var3']
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Template::Toolkit: get the names of mentioned variables?
by jasonk (Parson) on Apr 20, 2005 at 22:43 UTC | |
by dgaramond2 (Monk) on Apr 21, 2005 at 02:02 UTC | |
by dgaramond2 (Monk) on Apr 21, 2005 at 05:42 UTC |