I'm guessing the easiest work-around would be to add to your template include path so that even templates that don't actually get used can be found, like:
my $template = HTML::Template->new(
filename => 'file.tmpl',
path => [ '/path/to/templates',
'/alternate/path'
] );
I've become increasingly unhappy with HTML::Template lately, largely due to the inability to do a construct like
<tmpl_include name="<tmpl_var name='foo'>">
which is another form of what you seem to be looking for. As far as I know, the only way to accomplish something like this is to use the "filter" option, like:
my $tmpl = HTML::Template->new(
'filename' => "foo.tmpl",
'filter' => sub {
my $text_ref = shift;
$$text_ref =~ s/special include tag/the actual include file ta
+g/;
} );
Xaositect - Whitepages.com