This is different than the commify proposed, in that the other matched the first
number in the string... not that I'm complaining. ;)
I've been doing the following so long TIMTOWTDI says why bother to change...
our $t = new Template ({
FILTERS => { commify => \&commify, },
...,
});
> Now all we need is to be able to do this:
>
> [% MACRO tt.item.commify GET n.chunk(-3).join(', ') %]
I can't believe I'm saying this, but maybe you could add a new keyword METHOD?
[% METHOD scalar commify(arg,arg2) GET item.chunk(arg||-3).join(arg2||',') %]
Of course, then you have to pick scalar, array, hash, etc. AND have a system for
naming the item AND the arguments... Bah, forget I mentioned it. If people want more
than FILTER and MACRO and BLOCK they should probably learn to stuff it into the Stash
Ops themselves. ;)
--mark