####
####
use strict;
use HTML::Template;
my $tmpl = new HTML::Template(
filename => 'first.tmpl'
);
# generate custom page link...
my $custom_page = "second.tmpl";
# inject a custom piece of Template code
$tmpl->param(special_page_include => qq//);
# process custom built template..
my $tmpl_final = new HTML::Template(scalarref => \$tmpl->output());
print $tmpl_final->output();
####
Including custom page...
-----------
rest of the page
####
SECOND PAGE!
####
Including custom page...
SECOND PAGE!
-----------
rest of the page