Text::Replace is a Perl module to replace variables from a hash.
# Subroutine Interface
use Text::Replace qw(&replace_variables);
$success = replace_variables($template, %variable_hash, @variable);
# Class Interface
$success = Text::Replace->replace_variables($template, %variable_hash, @variable);
The Text::Replace program module is simple and plain by design. The Text::Replace program module mimics the built-in Perl double quote, '"', literal scalar that replaces Perl scalar variables named with a leading '$'. The Text::Replace program module stays in the background, just like John William's movie scores.
There is no large manual thicker than the Bible with tricks and tips and gyrations to learn and to distract. The module is plain, simple with no expressiveness. The Text::Replace program module does only one thing: substitute a value for a variable. It is amazing how many times, just a simple double quote literal replacement in a small string or even a large text string gets the job done.
Does Text::Replace solve all variable replacement, template problems? Definitely not. There is no capabilities for inserting graphs, text wrap plug-ins, GD interface. If an application needs something this sophisticated, there are many fine template program modules in CPAN such as the highly rated Template program module.