NAME

Template::Resolver - A powerful, and simple, library for resolving placeholders in templated files

VERSION

version 1.10

SYNOPSIS

use Template::Resolver;
my $resolver = Template::Resolver->new($entity);
$resolver->resolve(file => '/path/to/file', key => 'REPLACEME');

DESCRIPTION

This module provides a powerful way to resolve placeholders inside of a templated file. It uses Template::Transformer to interpolate the the placeholder values.

CONSTRUCTORS

new(\%entity, %options)

Creates a new resolver with properties from \%entity and %options if any. The available options are:

os

The operating system path format used when resolving ${TEMPLATE_os{xxx}} placeholders.

METHODS

resolve(%options)

Will read the template and replace all placeholders prefixed by key. One of the options content, handle, or filename is required. The available options are:

content

A string containing templated content.

filename

The name of a file containing templated content.

handle

A handle to a file containing templated content.

key

The template key, defaults to TEMPLATE.

AUTHOR

Lucas Theisen <lucastheisen@pastdev.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Lucas Theisen.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

SEE ALSO

Please see those modules/websites for more information related to this module.