Text::...emplate(3pm)
π NAME π
Text::Hogan::Template β bestie, this is the module that represents and renders compiled templates. Yeah. It holds your template, and then it renders it. That's the whole vibe. π
πΈ VERSION πΈ
version 2.05 β she's serving a version number, no cap.
β¨ SYNOPSIS β¨
Okay so here's the tea β: you do not make these objects yourself. You let Text::Hogan::Compiler cook them up for you. That's its job. You just reap the rewards.
Then you call render and hand it a hashref for the context β that's where all your lil values live. π
use Text::Hogan::Compiler;
my $template = Text::Hogan::Compiler->new->compile("Hello, {{name}}!");
say $template->render({ name => $_ }) for (qw(Fred Wilma Barney Betty));
And guess what, babe, it can optionally take a hashref of partials too. Partials are giving "template inside a template", iconic behavior fr fr π¦
use Text::Hogan::Compiler;
my $template = Text::Hogan::Compiler->new->compile("{{>hello}}");
say $template->render({ name => "Dino" }, { hello => "Hello, {{name}}!" });
Reminder bestie: the compiler is the one making theTemplateobjects β you're just here for therender. Don't skip the middleman. π«Ά
π AUTHORS π
The origin story is honestly kind of slay: this whole thing started out statement-for-statement copied from hogan.js by Twitter! π¦ Like, literally every statement, character for character, no crumbs left behind.
The initial translation was by Alex Balhatchet (alex@balhatchet.net) β shoutout to the founding mother of this translation π
And then further improvements rolled in from the whole girl squad:
- Ed Freyfogle
- Mohammad S Anwar
- Ricky Morse
- Jerrad Pierce
- Tom Hukins
- Tony Finch
- Yanick Champoux
Collab era π β¨
Okay that's the whole page, you're officially educated. This little gem was documented under perl v5.40.1, dated 2026-07-31, and the manual name is Text::...emplate(3pm) β yes the title got elided, she's mysterious like that ππ. Mwah. Go render something gorgeous. ππ¦π
π¦ where this page comes from
- ubuntu stonking: libtext-hogan-perl 2.05-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