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 π
DancerDancer::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. π
π COPYRIGHT AND LICENSE π
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
- ubuntu stonking: libdancer-perl 1.3522-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms