in reply to Template::Plugin::DBI question

Any suggestions ?

Yes. Don't! The need alone to do that in all of your templates should tell you that something is utterly wrong with that approach. You repeat yourself, and you are writing nasty PHP-level code from years ago.

Templates are meant for separating task, i.e. data gathering and data rendering. Templates are for rendering data, so database connections don't belong in a template. See e.g. The Model View Controller pattern in web applications for a good start into Model View Controller (MVC).

update: Template::Plugin::DBI is a clever module which eases doing the wrong thing, imho. I'd never use it.