.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Text::MicroTemplate::File 3pm" .TH Text::MicroTemplate::File 3pm "2022-10-13" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Text::MicroTemplate::File \- a file\-based template manager .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Text::MicroTemplate::File; \& \& our $mtf = Text::MicroTemplate::File\->new( \& include_path => [ $path1, $path2, ... ], \& use_cache => 1, \& ); \& \& # render \& $mtf\->render_file(\*(Aqtemplate.file\*(Aq, $arg1, $arg2, ...); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Text::MicroTemplate::File is a file-based template manager for Text::MicroTemplate. .SH "PROPERTIES" .IX Header "PROPERTIES" Text::MicroTemplate provides OO-style interface with following properties. .SS "include_path" .IX Subsection "include_path" include path (default: ['.']) .PP This accessor is readonly. .SS "use_cache" .IX Subsection "use_cache" cache mode (0: no cache (default), 1: cache with update check, 2: cache but do not check updates) .SS "open_layer" .IX Subsection "open_layer" layer passed to open (default: \*(L":utf8\*(R") .SS "package_name" .IX Subsection "package_name" package under where template files are compiled (default: \*(L"main\*(R") .SH "METHODS" .IX Header "METHODS" .SS "build_file($file)" .IX Subsection "build_file($file)" Returns a subref that renders given template file. .ie n .SS "render_file($file, @args)" .el .SS "render_file($file, \f(CW@args\fP)" .IX Subsection "render_file($file, @args)" Renders the template file with given arguments. .ie n .SS "wrapper_file($file, @args)\->(sub { template lines })" .el .SS "wrapper_file($file, \f(CW@args\fP)\->(sub { template lines })" .IX Subsection "wrapper_file($file, @args)->(sub { template lines })" Wraps given template with wrapper file. Internally the processed template is passed as \f(CW$_\fR[0] to the wrapper template. .SH "SEE ALSO" .IX Header "SEE ALSO" Text::MicroTemplate .SH "AUTHOR" .IX Header "AUTHOR" Kazuho Oku .SH "LICENSE" .IX Header "LICENSE" This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10.