---
name: "Rex::Template::NG"
section: "3pm"
platform: "linux"
package: "rex"
version: "1.16.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Rex::Template::NG"
---

# Rex::Template::NG(3pm)

simple template engine (replacing Rex::Template)

## NAME

Rex::Template::NG - simple template engine (replacing Rex::Template)

## SYNOPSIS

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

## DESCRIPTION

This is intended as a replacement of the original Rex::Template, therefore its interface and syntax are identical. The main differences are:

- •

  produces "more correct" output in case when comping is required

- •

  gives better diagnostics in case of errors

It is recommended to use this module instead of Rex::Template.

## DIAGNOSTICS

It prints the whole template as `"INFO"` level messages, and then a message about the problem with its context and line number (e.g. *"Unknown variable name $var on code line: ... line: ..."*).

## CONFIGURATION AND ENVIRONMENT

## DEPENDENCIES

## INCOMPATIBILITIES

## BUGS AND LIMITATIONS
