=pod
=encoding UTF-8
=head1 NAME
Template::Tiny - Template Toolkit reimplemented in as little code as possible
=head1 VERSION
version 1.14
=head1 SYNOPSIS
my $template = Template::Tiny->new( TRIM => 1, );
$template->process( <<'END_TEMPLATE', { foo => 'World' } ); Hello [% foo %]! END_TEMPLATE
=head1 DESCRIPTION
B
It is intended for use in light-usage, low-memory, or low-cpu templating situations, where you may need to upgrade to the full feature set in the future, or if you want the retain the familiarity of TT-style templates.
For the subset of functionality it implements, it has fully-compatible template
and stash API. All templates used with B
Unlike Template Toolkit, B
=head2 SUPPORTED USAGE
Only the default C<[% %]> tag style is supported.
Both the C<[%+ +%]> style explicit whitespace and the C<[%- -%]> style
explicit chomp B
Variable expressions in the form C<[% foo.bar.baz %]> B
Appropriate simple behaviours for C
C
Support for looping (or rather iteration) is available in simple
C<[% FOREACH item IN list %]> form B
All of the four supported control structures C
The treatment of C<_private> hash and method keys is compatible with L Toolkit, returning null or false rather than the actual content of the hash key or method.
Anything beyond the above is currently out of scope.
=head1 METHODS
=head2 new
my $template = Template::Tiny->new( TRIM => 1, );
The C
The only parameter it currently supports is C
Additional parameters can be provided without error, but will be ignored.
=head2 process
my $text = $template->process( \$input, $vars );
$template->process( \$input, $vars );
my $output = ''; $template->process( \$input, $vars, \$output );
The C
The first parameter is a reference to a text string containing the template text. A reference to a hash may be passed as the second parameter containing definitions of template variables.
If a third parameter is provided, it must be a scalar reference to be populated with the output of the template.
For a limited amount of time, the old deprecated interface will continue to
be supported. If C
If C
=head1 SEE ALSO
L
=head1 SUPPORT
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Template-Tiny> (or Lbug-Template-Tiny@rt.cpan.org|mailto:bug-Template-Tiny@rt.cpan.org).
=head1 AUTHOR
Adam Kennedy adamk@cpan.org
=head1 CONTRIBUTORS
=for stopwords Adam Kennedy Karen Etheridge Alexandr Ciornii Matt S Trout
=over 4
=item *
Adam Kennedy adam@ali.as
=item *
Karen Etheridge ether@cpan.org
=item *
Alexandr Ciornii alexchorny@gmail.com
=item *
Matt S Trout mst@shadowcat.co.uk
=back
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2009 by Adam Kennedy.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
=cut