Help language development. Donate to The Perl Foundation

Web::Template zef:raku-community-modules last updated on 2023-01-18


Actions Status



A simple abstraction layer, providing a consistent API for different template engines. This is designed for use in higher level web frameworks such as Web::App::Ballet and Web::App::MVC.

Supported Template Engines

Broken Template Engines


All of the wrapper classes provide common API methods, so as long as your web framework or application supports the following API, it doesn't have to worry about the APIs of the individual template engines themselves.

set-path ($path, ...)

Set the directory or directories to find the template files in. For engines without native support of multiple search paths, or even file-based templates to begin with, the wrapper classes add such support.

render ($template, ...)

Takes the template name to render, and passes any additional parameters through to the template engine. Most template engines use named parameters, but some like Mojo, use positional parameters. This handles both.


use Web::Template::TAL;
my $engine =;
$engine.render('example.xml', :name<Bob>);

See one of the web application frameworks using this for better examples.



Timothy Totten

Source can be located at: . Comments and Pull Requests are welcome.


Copyright 2013 - 2019 Timothy Totten

Copyright 2020 - 2022 Raku Community

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