What is Xslate?
Xslate is a template engine for Perl5 with the following features:
- The fastest in CPAN - Up to 50~100 times faster than TT2! (see the benchmarks for more info)
- Support of multiple template syntaxes - TT2 compatible syntax, for example
- Easy to enhance - by importing subroutines and/or by calling object methods
- Safe - Escapes HTML meta characters by default
- Debuggable - Readable error messages with correct line numers
Documentation
Getting started
Install cpanminus and then run the following command to install Xslate.
$ cpanm Text::Xslate
Introduction to Xslate
Template code
: # in Kolon, the default syntax
: for ["Xslate"] -> $lang {
Hello, <: $lang :> world!
: }
[%# in TTerse, a TT2 compatible syntax -%]
[% FOR lang IN ["Xslate"] -%]
Hello, [% lang %] world!
[% END -%]
{* in Clevery, a Smarty compatible syntax *}
{foreach from=`["Xslate"]` item=lang}
Hello, {$lang} world!
{/foreach}
What People Say
- xslate++ # pretty fast - tokuhirom
- Introducing Text::Xslate - lestrrat
- Xslate - Seu próximo sistema de templates - Breno G. de Oliveira
Repositories
- Text::Xslate - Xslate template engine
Distributions
- Text::Clevery - Smarty compatible syntax and functions
- Text::Xslate::Bridge::Alloy - Use Template::Alloy methods and filters
- Text::Xslate::Bridge::TT2 - Use TT2 methods and filters (uses TT2 runtime)
- Text::Xslate::Bridge::TT2Like - Use TT2 methods and filters (standalone)
- Catalyst::View::Xslate - Text::Xslate View Class
- MojoX::Renderer::Xslate - Text::Xslate renderer for Mojo
- Tiffany - Generic interface for Perl5 template engines
Related modules
- Modules that depend on Text::Xslate (deps.cpantesters.org)

