Rex::T...ate::NG(3pm)

πŸ’– Rex::T...ate::NG πŸ’–

okay so bestie, welcome to Rex::Template::NG β€” that's the module name, section 3pm, and the docs live under User Contributed Perl Documentation. if you saw the header Rex::T...ate::NG(3pm) up top, yep, that's her. she's the glow-up replacement for the original Rex::Template, and I'm gonna walk you through it like we're passing notes in class. πŸŽ€


✨ NAME ✨

Rex::Template::NG β€” a simple template engine, and yes, she is replacing Rex::Template. out with the old, in with the iconic. πŸ‘‘


✨ SYNOPSIS ✨

the whole vibe in one snippet, no notes:

use Rex::Template::NG;

my $template = Rex::Template->new;

print $template->parse($content, \%template_vars);
print $template->parse($content, @template_vars);

that's it, that's the whole serve. 🫢


✨ DESCRIPTION ✨

so this module is intended as a replacement for the original Rex::Template β€” meaning its interface and its syntax are identical. same energy, same API, no relearning required. periodt.

the main differences, in a little list because we love a list:

  • she produces "more correct" output in the case when comping is required πŸ’…
  • she gives better diagnostics when errors happen β€” way more helpful, way less cryptic, she literally tells you what went wrong 😭

and the recommendation, straight up: use this module instead of Rex::Template. that's the tea. πŸ”₯


✨ DIAGNOSTICS ✨

when something goes sideways, she does not leave you on read. here's what she does:

  • she prints the whole template as "INFO" level messages πŸ“’
  • then she prints a message about the problem itself, with its context and line number πŸ”

the message looks a lil something like this:

Unknown variable name $var on code line: ... line: ...

(the ... bits get filled in with the real context and the real line number, bestie β€” that's the whole point of the upgrade.) ⭐


✨ CONFIGURATION AND ENVIRONMENT ✨

this section is literally empty. nothing to configure, no environment variables, no drama. πŸ¦‹


✨ DEPENDENCIES ✨

also empty. she's low maintenance, we love a self-sufficient queen. πŸ’œ


✨ INCOMPATIBILITIES ✨

empty too! no incompatibilities listed. she plays nice. 🌸


✨ BUGS AND LIMITATIONS ✨

nothing documented here. she's not perfect (who is), but no bugs or limitations made it onto the record. πŸ™ˆ


that's the whole page, bestie. go forth and template responsibly. 🌈

sign-off time: this page is from perl v5.40.1, dated 2025-10-03, and it's filed under Rex::T...ate::NG(3pm) in the User Contributed Perl Documentation. mwah. πŸ’‹ ✨

πŸ“¦ where this page comes from