NAME

HTML::Template::Compiled::Plugin::Sprintf - Use sprintf in HTML::Template::Compiled templates

VERSION

version 0.03

SYNOPSIS

use HTML::Template::Compiled;

my $template_sprintf_8 = '<%= test ESCAPE=SPRINTF_8_RIGHT %>';
my $text               = 'hello';

my $tmpl = HTML::Template::Compiled->new(
    scalarref => \$template_sprintf_8,
    plugin    => [ 'HTML::Template::Compiled::Plugin::Sprintf' ],
);

$tmpl->param( test => $text );
my $output = $tmpl->output;

DESCRIPTION

Sometimes, you need formatted text (e.g. in mails) and you want to use sprintf. This module provides 30 sprintf formatters for templates.

ESCAPES

SPRINTF_8_RIGHT
SPRINTF_6_RIGHT
SPRINTF_20_LEFT

METHODS

register

escape_sprintf_6_right

escape_sprintf_8_right

escape_sprintf_30_left

AUTHOR

Renee Baecker <reneeb@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2013 by Renee Baecker.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)