Text::...::Util(3pm)
β¨ Text::Xslate::Util β the manual, but make it cute β¨
okay bestie, so this is Text::...::Util(3pm), straight outta the User Contributed Perl Documentation collection. It's the little utility drawer that comes with Xslate, and honestly? it's giving "small but mighty" π
πΈ NAME πΈ
Text::Xslate::Util β a whole set of utilities for Xslate, no cap π
π SYNOPSIS π
here's the vibe, literally just:
use Text::Xslate::Util qw(
mark_raw
unmark_raw
html_escape
uri_escape
p
html_builder
hash_with_default
);
slay. that's the whole import list, right there. π
π¦ DESCRIPTION π¦
This module provides utilities for Xslate. That's it, that's the description β it's a toolbox, and the tools are down below. π§°β¨
π INTERFACE π
π Exportable functions π
these are the ones you can pull into your own namespace with use. let's go one by one, bestie:
mark_raw($str)β this is the actual entity (the real deal, the implementation) behind themark_rawfilter. π«Άunmark_raw($str)β same energy, but for theunmark_rawfilter. this is the entity of it. πhtml_escape($str)β yep, you guessed it, this is the entity of thehtml_escapefilter. β¨uri_escape($str)β and this one is the entity of theurifilter. (noturi_escape, theurifilter β look, I just report the facts, okay π)p($any)/dump($any)β this one displays the contents of$anyusingData::Dumper. π¦π It's the entity of thedumpfilter, and it is so useful for debugging. honestly my go-to when something's acting sus.html_builder { block } | \&function :CodeRefβ this wraps a block or a&functionwithmark_rawso that the brand-new subroutine returns a raw string. πβ¨ Basically: you hand it something, it comes back raw. This function is the same as what Text::Xslate exports.hash_with_default \%hash, $default :Anyβ sets a default value$defaultonto%hashand returns a HashRef. π This one is provided for debugging, so it's lowkey a helper, not a production flex.
ngl, several of these are literally "the entity of" an Xslate filter β that's the whole point. The filter in your template, the function in your Perl? Same soul. π«Ά
π SEE ALSO π
- Text::Xslate β go read it, bestie, it's the main character here π°
and that's a wrap on the page π¬ this gem ships as part of perl v5.42.3, dated 2026-08-22, and it lives under the very iconic name Text::...::Util(3pm). mwah, go debug something pretty ππ
π¦ where this page comes from
- ubuntu stonking: libtext-xslate-perl 3.5.9-2build2 Β· 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