HTML::...elpers(3pm)
π NAME π
HTML::Template::Plugin::Dot::Helpers β bestie, this is the plugin that slides a bunch of genuinely useful objects into your templates. that's it, that's the whole vibe β¨
πΈ SYNOPSIS πΈ
okay so first, in your Perl:
use HTML::Template::Plugin::Dot::Helpers;
then in your template, you can literally just do this:
<tmpl_var Number.format_currency(orderitem.price)>
and it works. no cap. π
π¦ DESCRIPTION π¦
this helper class drops some very handy objects into your Dot-enabled templates (go look at HTML::Template::Plugin::Dot for the whole picture, iykyk). π
β¨ Added objects β¨
π’ Number
an extended Number::Format object. docs live over in Number::Format, go read those. important though β only the object oriented methods are supported here. that's the rule, periodt. π
i've added several generic numerical methods. most of them (okay, honestly all of them in this release) are boolean methods, which is giving extremely useful in <tmpl_if>s. here's the lineup:
equalsβ test whether two numbers are equal (==)le,lt,ge,gtβ test how two numbers compare (implemented with<=,<,>=,>respectively)
the following is not yet implemented. sad but true, we move. π
π§΅ String
adds generic string testing functions, similar to the ones above:
equalsβ test whether two strings are equal (eq)le,lt,ge,gtβ test how two strings compare lexically
π AUTHOR π
Rhesa Rozendaal, <rhesa@cpan.org> β icon, legend, the moment. π«Ά
π BUGS π
please report any bugs or feature requests to bug-html-template-plugin-dot-helpers@rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Template-Plugin-Dot-Helpers>. i will be notified, and then you'll automatically be notified of progress on your bug as i make changes. we're in this together fr fr. π
π ACKNOWLEDGEMENTS π
(this section is empty, so consider this your moment of silence bestie) π―οΈ
β COPYRIGHT & LICENSE β
Copyright 2005 Rhesa Rozendaal, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page, babe π this one shipped with perl v5.38.2 and is dated 2024-03-30 β go forth and make your templates slay π
β¨πΈ
π¦ where this page comes from
- debian trixie: libhtml-template-pluggable-perl 0.22+~cs0.7-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libhtml-template-pluggable-perl 0.22+~cs0.7-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libhtml-template-pluggable-perl 0.22+~cs0.7-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms