|
NAMETiffany - Generic interface for Perl5 template engines.SYNOPSISuse Tiffany; my $tmpl = Tiffany->load('Text::Xslate', {syntax => 'TTerse'}); $tmpl->render(\'Hello, [% name %]', {name => 'John'}); # => "Hello, John" DESCRIPTIONTiffany is a generic interface for Perl5 template engines.FACTORY METHODTiffany.pm acts as a factory for Tiffany::* classes, which in turn are the actual adaptor classes for each template engine.
The Tiffany ProtocolThe 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
AUTHORTokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>SEE ALSOAny::Template, <http://github.com/rtomayko/tilt>THANKS TOkazuhookugfx miyagawa lestrrat LICENSECopyright (C) Tokuhiro MatsunoThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |