The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tiffany - Generic interface for Perl5 template engines.

SYNOPSIS

use Tiffany;

my $tmpl = Tiffany->load('Text::Xslate', {syntax => 'TTerse'});
$tmpl->render(\'Hello, [% name %]', {name => 'John'});
# => "Hello, John"

DESCRIPTION

Tiffany is a generic interface for Perl5 template engines.

FACTORY METHOD

Tiffany.pm acts as a factory for Tiffany::* classes, which in turn are the actual adaptor classes for each template engine.

The Tiffany Protocol

The Tiffany protocol is based on duck typing. A template adaptor does not need to inherit from a particular class, but its API needs to adhere to the spec provided here.

In the documentation that follows, Tiffany::Thing represents an adaptor class.

HOW TO USE IT IN MY WEB APPLICATION FRAMEWORK?

Example code is here: eg/sinatraish/ in distribution tar ball or http://github.com/tokuhirom/p5-tiffany/tree/master/eg/sinatraish/.

FAQ

AUTHOR

Tokuhiro Matsuno

SEE ALSO

Any::Template, http://github.com/rtomayko/tilt

THANKS TO

kazuhooku

gfx

miyagawa

lestrrat

LICENSE

Copyright (C) Tokuhiro Matsuno

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.