Dancer2...te::Tiny(3)

πŸ’– NAME πŸ’–

Dancer2::Template::Tiny β€” it's the Template::Tiny engine for Dancer2, bestie. That's the whole vibe. This is the Dancer2...te::Tiny(3) manual page btw, in case you were wondering what you clicked on. πŸŽ€

✨ VERSION ✨

version 2.2.1 β€” she's on 2.2.1, no cap. πŸ‘‘


🌸 SYNOPSIS 🌸

Okay so here's the tea: this template engine lets you use Template::Tiny inside your Dancer2 app. Literally that's it. That's her job. πŸ’…

Now, Template::Tiny is an implementation of a subset of Template::Toolkit β€” like, the major parts, the main-character bits β€” except it eats much less memory and it's faster. So if you're only using the main functions of Template::Toolkit, you could totally just use Template::Tiny instead. And the best part? You can seamlessly move back to Template::Toolkit whenever you want. No drama, no locked doors, no "oops I'm trapped now". πŸ¦‹

To use this engine, all you gotta configure in your Dancer2's config.yaml is:

template: "tiny"

And of course β€” because we contain multitudes β€” you can also set this while you're working, using set:

# code code code
set template => 'tiny';

Oh and here's a lil something iconic: since Dancer2 has internal support for a wrapper-like option with the layout configuration option, you can have a Template::Toolkit-like WRAPPER even though Template::Tiny doesn't really support it. Yes, she's giving what Template::Toolkit is giving. Periodt. πŸ”₯


πŸ’œ METHODS πŸ’œ

πŸ’… render($template, \%tokens)

This one renders the template. Slay.

  • The first arg is a filename for the template file, or a reference to a string that contains the template. Either/or, your call, bestie.
  • The second arg is a hashref for the tokens that you wish to pass to Template::Toolkit for rendering.

That's the whole method. Short, sweet, efficient. We stan. 🌟


🫢 SEE ALSO 🫢

  • Dancer2
  • Dancer2::Core::Role::Template
  • Template::Tiny

πŸŽ€ AUTHOR πŸŽ€

Dancer Core Developers β€” legends, honestly. πŸ‘‘


This software is copyright (c) 2026 by Alexis Sukrieh.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Free as in freedom, free as in go off. πŸ’–


k bye bestie, this was perl v5.42.3 dropping on 2026-09-20, and it's the Dancer2...te::Tiny(3) page β€” hope she served u well βœ¨πŸ’…πŸŽ€

πŸ“¦ where this page comes from