I have been playing around with Template::Toolkit for some time now and I have run into the need of currency formatting. I currently have a commafy display function (the code for that I found here :-D) that I am using in my Template and I tried using the format filters that come with Template::Toolkit to add decimal places to the number, but it appears that it only effects the output.
It would be ideal to have a solution that I can format the number and then commafy it via Template::Toolkit and not have to inject perl code (which I'm doing now via sprintf.) I have a couple of ideas on how to do this and I am seeking wisdom on the best approach.
Any suggestions on how to get this done the right and correct way would be greatly appreciated. Thank you for your time.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |