Jan Gehring > Rex-0.43.2 > Rex::Template

Download:
Rex-0.43.2.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  5
Open  1
View/Report Bugs
Source   Latest Release: Rex-0.55.0

NAME ^

Rex::Template - Simple Template Engine.

DESCRIPTION ^

This is a simple template engine for configuration files.

SYNOPSIS ^

 my $template = Rex::Template->new;
 print $template->parse($content, \%template_vars);

EXPORTED FUNCTIONS ^

is_defined($variable, $default_value)

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") %>
syntax highlighting: