HTML::...elpers(3pm)

πŸ“¦
version 0.22+~cs0.7 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 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