.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 "Alien::Build::Interpolate 3" .TH Alien::Build::Interpolate 3 2023-07-25 "perl v5.38.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 Alien::Build::Interpolate \- Advanced interpolation engine for Alien builds .SH VERSION .IX Header "VERSION" version 2.80 .SH CONSTRUCTOR .IX Header "CONSTRUCTOR" .SS new .IX Subsection "new" .Vb 1 \& my $intr = Alien::Build::Interpolate\->new; .Ve .SS add_helper .IX Subsection "add_helper" .Vb 2 \& $intr\->add_helper($name => $code); \& $intr\->add_helper($name => $code, %requirements); .Ve .SS replace_helper .IX Subsection "replace_helper" .Vb 2 \& $intr\->replace_helper($name => $code); \& $intr\->replace_helper($name => $code, %requirements); .Ve .SS has_helper .IX Subsection "has_helper" .Vb 1 \& my $coderef = $intr\->has_helper($name); .Ve .PP Used to discover if a helper exists with the given name. Returns the code reference. .SS execute_helper .IX Subsection "execute_helper" .Vb 1 \& my $value = $intr\->execute_helper($name); .Ve .PP This evaluates the given helper and returns the result. .SS interpolate .IX Subsection "interpolate" .Vb 2 \& my $string = $intr\->interpolate($template, $build); \& my $string = $intr\->interpolate($template); .Ve .PP This takes a template and fills in the appropriate values of any helpers used in the template. .PP [version 2.58] .PP If you pass in an Alien::Build instance as the second argument, you can use properties as well as helpers in the template. Example: .PP .Vb 1 \& my $patch = $intr\->template("%{.install.patch}/foo\-%{.runtime.version}.patch", $build); .Ve .SS requires .IX Subsection "requires" .Vb 1 \& my %requires = $intr\->requires($template); .Ve .PP This returns a hash of modules required in order to execute the given template. The keys are the module names and the values are the versions. Version will be set to \f(CW0\fR if any version is sufficient. .SS clone .IX Subsection "clone" .Vb 1 \& my $intr2 = $intr\->clone; .Ve .PP This creates a clone of the interpolator. .SH AUTHOR .IX Header "AUTHOR" Author: Graham Ollis .PP Contributors: .PP Diab Jerius (DJERIUS) .PP Roy Storey (KIWIROY) .PP Ilya Pavlov .PP David Mertens (run4flat) .PP Mark Nunberg (mordy, mnunberg) .PP Christian Walde (Mithaldu) .PP Brian Wightman (MidLifeXis) .PP Zaki Mughal (zmughal) .PP mohawk (mohawk2, ETJ) .PP Vikas N Kumar (vikasnkumar) .PP Flavio Poletti (polettix) .PP Salvador Fandiño (salva) .PP Gianni Ceccarelli (dakkar) .PP Pavel Shaydo (zwon, trinitum) .PP Kang-min Liu (劉康民, gugod) .PP Nicholas Shipp (nshp) .PP Juan Julián Merelo Guervós (JJ) .PP Joel Berger (JBERGER) .PP Petr Písař (ppisar) .PP Lance Wicks (LANCEW) .PP Ahmad Fatoum (a3f, ATHREEF) .PP José Joaquín Atria (JJATRIA) .PP Duke Leto (LETO) .PP Shoichi Kaji (SKAJI) .PP Shawn Laffan (SLAFFAN) .PP Paul Evans (leonerd, PEVANS) .PP Håkon Hægland (hakonhagland, HAKONH) .PP nick nauwelaerts (INPHOBIA) .PP Florian Weimer .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2011\-2022 by Graham Ollis. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.