Templa...::Comma(3pm)
π Template::Plugin::Comma β the manual, but make it cute π
aka Templa...::Comma(3pm), straight outta the User Contributed Perl Documentation corner of the perl-verse. It's a TT plugin that commifies your numbers. That's it. That's the whole personality and honestly? Iconic. π
β¨ NAME β¨
Template::Plugin::Comma β a TT Plugin whose entire job is commifying numbers, and she does it flawlessly π
πΈ SYNOPSIS πΈ
okay bestie, here's the vibe. You USE it first, obviously:
[% USE Comma %]
Then you can hit it with the filter treatment:
[% FILTER comma -%]
This item costs 10000 dollar.
[%- END %]
and the output is giving:
# Output:
# This item costs 10,000 dollar.
Orrr you can pipe a value straight into it like the main character you are:
This item costs [% item.price | comma %] dollar.
which also serves:
# Output:
# This item costs 10,000 dollar.
Same result, two ways, zero notes. β¨
π¦ DESCRIPTION π¦
So Template::Plugin::Comma is a plugin for TT, and what it does is let you commify your numbers in templates. That's the whole deal, no cap. The docs lowkey point out this would be especially useful for prices, whichβ¦ yeah, obviously, who's out here typing 10000 when they could be typing the gorgeous little comma-separated masterpiece that is 10,000. π
π NOTE π
Heads up bestie, this one is important: this module does nothing for I18N. Nothing. Zero. If you need that, go try Template::Plugin::Number::Format instead. π«Ά
π AUTHOR π
- The original idea came from Yoshiki Kurihara
<kurihara@cpan.org>πΈ - The TT plugin itself was implemented by Tatsuhiko Miyagawa
<miyagawa@bulknews.net>β¨
And the legal bit, fr fr: this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
π SEE ALSO π
Template"Template::Plugin::Number::Format"(the one you go to when you need I18N, iykyk)
And that's the whole page, bestie. This lil' slice of documentation comes from perl v5.32.0, dated 2021-01-08, filed under Templa...::Comma(3pm). Stay commified, stay gorgeous. π
π¦β¨
π¦ where this page comes from
- debian bookworm: libtemplate-plugin-comma-perl 0.04-1.1
- debian trixie: libtemplate-plugin-comma-perl 0.04-1.1
- ubuntu jammy: libtemplate-plugin-comma-perl 0.04-1.1
- ubuntu noble: libtemplate-plugin-comma-perl 0.04-1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms