in reply to Thinking about reusable software components
You can also look at Web Application Frameworks and their Templating Engines with a Comparative Study of Template and HTML::Template.