Text::...Sprintf(3pm)
π Text::MicroMason::Sprintf β NAME π
So this page is Text::...Sprintf(3pm), part of the User Contributed Perl Documentation, and the module itself is Text::MicroMason::Sprintf β the Formatted Interpolation Engine. bestie, that's the whole name section, we're moving. β¨
πΈ SYNOPSIS πΈ
okay so first thing, don't just use this class by itself, no ma'am β you pass its name in to get mixed in:
use Text::MicroMason;
my $mason = Text::MicroMason::Base->new( -Sprintf );
and then your templates can be written using Perl's sprintf interpolation syntax:
$coderef = $mason->compile( text => 'Hello %s' );
print $coderef->( 'World' );
it's giving Hello World and it's giving effortless. π
π DESCRIPTION π
Text::MicroMason::Sprintf uses Perl's sprintf formatting syntax for templating. that's the vibe. that's the whole thing. π¦
and like, obviously you don't need this module for simple cases of interpolation β nobody's saying you do β but if you're already using the MicroMason framework to process template files from disk, then this module should allow you to make your simplest templates run even faster. lowkey a glow-up for your pipeline. π₯
also! Perl's sprintf function supports traditional Unix-style sprintf() formatting as well as a number of very useful extensions. go consult "sprintf" in perlfuc for more details, iykyk. π
π¦ SEE ALSO π¦
- for an overview of this distribution, go look at Text::MicroMason π«
- this is a subclass intended for use with Text::MicroMason::Base π«Ά
- for distribution, installation, support, copyright and license info, see Text::MicroMason::Docs::ReadMe π
no cap: every option, path and caveat up there is exactly as the original page had it. we do not edit the facts in this house. π
okay bye bestie, this was perl v5.36.0, dated 2023-08-10 β thanks for reading the Text::...Sprintf(3pm) page, you ate. πβ¨
π¦ where this page comes from
- debian trixie: libtext-micromason-perl 2.23-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtext-micromason-perl 2.23-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtext-micromason-perl 2.23-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtext-micromason-perl 2.23-5 Β· 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