Text::...e::File(3pm)
β¨ NAME β¨
okay so Text::MicroTemplate::File β it's a file-based template manager π like, the little bestie that handles template files for Text::MicroTemplate. that's the whole vibe. periodt.
π SYNOPSIS π
use Text::MicroTemplate::File;
our $mtf = Text::MicroTemplate::File->new(
include_path => [ $path1, $path2, ... ],
use_cache => 1,
);
# render
$mtf->render_file('template.file', $arg1, $arg2, ...);
like yes construct it, give it your paths, give it a cache mode, then just yell render_file at it and it ate π₯
π¦ DESCRIPTION π¦
Text::MicroTemplate::File is a file-based template manager for Text::MicroTemplate. that's it, that's the description, no gatekeeping here π«Ά
π PROPERTIES π
Text::MicroTemplate provides an OO-style interface with the following properties π
πΈ include_path
the include path, bestie β¨ default is ['.']
this accessor is readonly β look but don't touch, she's not yours π
π use_cache
cache mode, iykyk:
0β no cache (this is the default)1β cache with update check2β cache but do not check updates
π§ open_layer
the layer that gets passed to open. default is ":utf8" β lowkey essential, don't skip it
π package_name
the package under which template files are compiled. default is "main" π
π₯ METHODS π₯
β build_file($file)
returns a subref that renders the given template file. cute little renderer-on-demand situation, obsessed π
π render_file($file, @args)
renders the template file with the arguments you hand it. main character energy fr fr πΈ
π¦ wrapper_file($file, @args)->(sub { template lines })
wraps the given template with a wrapper file β¨ and here's the detail that matters: internally, the processed template is passed as $_[0] to the wrapper template. no cap, that's literally how it gets in there π
π SEE ALSO π
Text::MicroTemplate
π«Ά AUTHOR π«Ά
Kazuho Oku <kazuhooku gmail.com> β the icon who made this, we stan π
π LICENSE π
This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10. slay, go wild, just keep the license π
and that's the whole page babes π this was documented as perl v5.36.0 back on 2022-10-13, under the manual name Text::...e::File(3pm) β go render something iconic πβ¨
π¦ where this page comes from
- ubuntu noble: libtext-microtemplate-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtext-microtemplate-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtext-microtemplate-perl 0.24-3 Β· 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