Help language development. Donate to The Perl Foundation

Template6 zef:raku-community-modules last updated on 2023-03-20


Actions Status


Template6 - A Template Engine for Raku


use Template6;


Inspired by Template Toolkit from Perl, Template6 is a simple template engine designed to be a content-neutral template language.

I also intend to borrow features and ideas from my own Flower and Garden projects.

This project does not intend to create an exact clone of Template Toolkit. Some features from TT are not planned for inclusion, and likewise, some feature will be included that are not in TT. Not all features will work the same either.

Currently implemented features

GET and SET statements, including implicit versions.

FOR statement.

This replaces the FOREACH statement in TT2. It can be used in one of four ways:

If used with Hashes, you'll need to query the .key or .value accessors.


These are very simplistic at the moment, but work for basic tests.

Differences with Template Toolkit



Short Term Goals

Long Term Goals

Possible future directions

I would also like to investigate the potential for an alternative to Template6::Parser that generates Raku closures without the use of EVAL. This would be far trickier, and would not be compatible with the precompiled templates, but would be an interesting exercise nonetheless.


Timothy Totten


Copyright 2012 - 2017 Timothy Totten

Copyright 2018 - 2023 Raku Community

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.