Text::...emplate(3pm)

πŸ“¦
version 2.05 Β· 3 versions
, in ubuntu stonking

πŸ’– 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 the Template objects β€” you're just here for the render. 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