Creating a Custom Dialect
package TemplateX::Dialect::BBCode; use base 'Template::TT3::Dialect'; our $TAGSET = [ bold => { # ... }, italic => { # ... }, # ... ]; 1;
Thus Spake Andy:
We can take our tagset definition and create a dialect for it. If we put
it in the TemplateX::Dialect::*
namespace then TT3 will find it automatically
(TemplateX
is a new namespace for TT extension modules). We make it a
subclass of Template::TT3::Dialect
and define the tagset as the $TAGSET
package variable.