[htmltmpl] Re: H::T future
Brought to you by:
samtregar
From: Lance A. B. <la...@be...> - 2003-12-09 07:20:44
|
On Mon, 2003-12-08 at 20:31, Karen J. Cravens wrote: > Okay, I did think of a teeny-tiny thing I'd like to have. It's not > exactly an addition to H::T itself, though. > > I occasionally find myself wanting to be able to define things in the > template. That is, setting parameters, a sort of tiny configuration file. > > I've been meaning to write a standard bit of code to do something like > that whenever I need some parameters that I don't want to hardcode, but > that I don't really need a full-fledged configuration file manager for... > something with just enough brains to parse a file, populate variables as > needed, and recognize when the configuration ends and the template begins, > and hand the rest of the file off to a new H::T instance. Argh. I can't remember where, but I ran across a Website package using HTML::Template that had this feature. The templates in the package have <TMPL_VALUE name="foo" value="bar"> tags and used a filter function to extract them from the templates and insert them into the template params. It was a very neat hack. --[Lance] -- Carolina Spirit Quest: http://www.carolinaspiritquest.org/ Celebrate The Circle: http://www.angelfire.com/nc/celebratethecircle/ My LiveJournal: http://www.livejournal.com/users/labrown/ |