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
compingis 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
- ubuntu resolute: rex 1.16.1-1 Β· Apache-2.0
- ubuntu stonking: rex 1.16.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms