Rex::Template - Simple Template Engine.
This is a simple template engine for configuration files.
my $template = Rex::Template->new; print $template->parse($content, \%template_vars);
This function will check if $variable is defined. If it is defined it will return the value of $variable. If not, it will return $default_value.
You can use this function inside your templates.
ServerTokens <%= is_defined($::server_tokens, "Prod") %>
To install Rex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rex
CPAN shell
perl -MCPAN -e shell install Rex
For more information on module installation, please visit the detailed CPAN module installation guide.