From: James E. J. <jam...@fx...> - 2003-05-20 16:18:12
|
On Tue, 20 May 2003, Sam Hartman wrote: > It's sort of hard for me to tell if anyone uses PSP. I suspect Netzah > will strongly consider it if we do any web stuff in the future. >=20 > Mason still doesn't really seem to have the right model. Working with recent versions of bugzilla, I took a look at Template. It's kind of interesting.. =20 Internally, there are similarities to PSP: there is a "template" source directory, and a template build directory containing intermediate files. The intermediate files each contain a hash defining an automatically generated anonymous subroutine that is called when the template is referenced and various other fields. It doesn't seem like you can call subroutines from within the rendering process. It looks like you do your logic and set some fields in some global variables. Then finally, the logic calls $template->process(), which I suppose expands nested template references and writes to stdout, substituting the static values into your page, and providing a handful of condition and looping constructs. james |