The second method isn't impossible. You could define a filter subroutine (as a parameter to HTML::Template::new) that would handle the includes, and modify the content accordingly. (In fact, it could use HTML::Template do do it.)
Ahh, I see. With the ability to filter I can just implement a special tag for the case and let that <TMPL_INCLUDE> alone. Thanks for quite a good suggestion!