NAME

QUESTIONS

General

How do you pronounce Xslate?

What Xslate stands for?

It stands for XS template, a template engine written in XS, although pure Perl implementations are also provided.

What are 'Kolon', 'Metakolon', and 'TTerse' ?

Xslate supports multiple template syntaxes. Kolon is the default syntax, Metakolon is suitable to output Kolon templates, and TTerse is compatible with Template-Toolkit. You can specify the template syntax by passing syntax option to the Text::Xslate constructor.

Does Xslate process text strings, or binary strings?

(The meaning of text string and binary string is that of Perl, see perlunifaq.)

Xslate assumes template files to be encoded in UTF-8 by default, so the output is a text string and template parameters must be text strings. However, if you want to process binary strings, you can do by passing :raw for input_encoding.

Functions, filters and macros

How can I use macros as a callback to high-level functions?

Macros are objects that overload &{}, the CODE dereference operator, so all you have to do is to call them, but don't check their types because they are not a real CODE reference.