Dancer...Simple(3pm)

πŸ’– Dancer::Template::Simple(3pm) πŸ’–

okay bestie, so this is <italic>User Contributed Perl Documentation</italic> β€” the little corner of the man pages where the people, not the core team, drop their lore. And today's main character? Dancer::Template::Simple. πŸŽ€


✨ NAME ✨

Dancer::Template::Simple β€” a pure Perl 5 template engine for Dancer. no C, no drama, just vibes and Perl. πŸ’…


🌸 VERSION 🌸

version 1.3522 β€” that's the one, fr fr.


πŸ¦‹ DESCRIPTION πŸ¦‹

So this template engine is the default one that ships with the Dancer micro framework. It's the one you get handed when you don't ask for anything else. 🫢

Here's the tea though: it's fine for development purposes, like genuinely fine, but it is not a powerful one. It's written in pure Perl and has no C bindings to accelerate the template processing. So it's giving "does the job" and not "does the job at Mach 3". 😭

⚠️ real talk bestie ⚠️ If you want to power an application with Dancer in a production environment, it's strongly advised to switch to Dancer::Template::TemplateToolkit. Like, strongly. Don't fight this one. πŸƒβ€β™€οΈπŸ’¨

🌈 SYNTAX 🌈

Okay so the cute part: a template written for Dancer::Template::Simple should be working just fine with Dancer::Template::TemplateToolkit. They're compatible like that, iykyk. πŸ₯°

But β€” and this is the important bit β€” the opposite is not true though. TemplateToolkit templates do not automatically play nice here. One-way street, no cap. 🚧

πŸ“ variables

To interpolate a variable in the template, use the following syntax:

<% var1 %>

If 'var1' exists in the tokens hash given, its value will be written there. That's it. That's the whole trick. slay. ✨


πŸ‘‘ SEE ALSO πŸ‘‘

  • Dancer
  • Dancer::Template

go read those too, bestie, they're the whole friend group. πŸ’œ


πŸŽ€ AUTHOR πŸŽ€

This module has been written by Alexis Sukrieh. 🫑


πŸ’œ LICENSE πŸ’œ

This module is free software and is released under the same terms as Perl itself. free as in, go wild, but respectfully. 🌸


🌟 AUTHOR 🌟

Dancer Core Developers β€” the collective, the council, the it-girls of the Dancer ecosystem. πŸ‘‘


This software is copyright (c) 2010 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. periodt. πŸ’–


and that's a wrap on the Dancer...Simple(3pm) page, generated with perl v5.40.1 on 2026-05-05 πŸ¦‹ β€” thanks for reading, ily, go template responsibly bestie πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from