Alien::Build::Interpolate - Advanced interpolation engine for Alien builds
Contents
Constructor
new
my $intr = Alien::Build::Interpolate->new;
add_helper
$intr->add_helper($name => $code);
$intr->add_helper($name => $code, %requirements);
replace_helper
$intr->replace_helper($name => $code);
$intr->replace_helper($name => $code, %requirements);
has_helper
my $coderef = $intr->has_helper($name);
Used to discover if a helper exists with the given name. Returns the code reference.
execute_helper
my $value = $intr->execute_helper($name);
This evaluates the given helper and returns the result.
interpolate
my $string = $intr->interpolate($template, $build);
my $string = $intr->interpolate($template);
This takes a template and fills in the appropriate values of any helpers used in the template.
[version 2.58]
If you pass in an Alien::Build instance as the second argument, you can use properties as well as helpers
in the template. Example:
my $patch = $intr->template("%{.install.patch}/foo-%{.runtime.version}.patch", $build);
requires
my %requires = $intr->requires($template);
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 0 if any version is sufficient.
clone
my $intr2 = $intr->clone;
This creates a clone of the interpolator.
Copyright And License
This software is copyright (c) 2011-2022 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5
programming language system itself.
perl v5.40.0 2024-11-15 Alien::Build::Interpolate(3pm)
Name
Alien::Build::Interpolate - Advanced interpolation engine for Alien builds
Version
version 2.84
