HTML::Template::Plugin::Dot::Helpers(3pm)

HTML::Template::Plugin::Dot::Helpers3pm

Add useful objects to your templates

Usage

  use HTML::Template::Plugin::Dot::Helpers;

Then in your template, you can do:

  <tmpl_var Number.format_currency(orderitem.price)>

Overview

This helper class adds some useful objects to your Dot-enabled templates (see HTML::Template::Plugin::Dot).

Added objects

Number

An extended Number::Format object. See Number::Format for documentation. Note that only the object oriented methods are supported here.

I've added several generic numerical methods. Most (well, all in this release) are boolean methods, useful in "<tmpl_if>s". They are:

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.

String

Adds generic string testing functions similar to the above:

equals - test whether two strings are equal (eq)
le, lt, ge, gt - test how two strings compare lexically

Acknowledgements

Releases

7 releases since Debian 7 (Wheezy); the text changed 4 times.

  1. 7–8
  2. 9–10
  3. 11
  4. 12
  5. 13

Author

Rhesa Rozendaal, "<[email protected]>"

Bugs

Please report any bugs or feature requests to "[email protected]", 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.

From libhtml-template-pluggable-perl 0.22+~cs0.7-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.