I can't find Local::Currency::Format on CPAN, so I can't show you exactly how it works with this module. I can, however, show you the general direction you need to go in.
You have several options:
1/ Use currency_format
to format the data before it is passed into the template.
my $amount = currency_format('USD', $amount, FMT_SYMBOL);
$tt->process($template_name, { amount => $amount, ... }) or die;
Then in the template you can just use [% amount %]
.
2/ Pass currency_format
as a dynamic variable to the template.
$tt->process($template_name, {
amount => $amount,
currency_format = > \¤cy_format,
...
}) or die;
Then in the template, you can use currency_format
as a function:
[% currency_format('USD', amount, FMT_SYMBOL) %]
3/ Write a real TT plugin for Local::Currency::Format.