in reply to Including template in template from other source than .tt file
Do you mean the template text is stored in a variable, not a filename ? Something like this using BLOCKS
poj#!/usr/bin/perl use strict; use Template; my $tt = Template->new({ BLOCKS => { tvar => 'Text is [% text %]', }, }); my $vars = { text => 'Some text' }; $tt->process(\*DATA, $vars); __DATA__ [% INCLUDE tvar %]
|
|---|