At 9:46 AM -0500 4/25/11, Chap Harrison wrote:


I'm not saying that an introduction to templates belongs in the module documentation, but can you (or somebody else) tell me what, generically, a "Template" module is for?

A Template is a method for generating files with dynamic content. In this context, a template module takes a template file that has some special formatting information in it and a set of data supplied by the caller. The module reads the file and, using the suppled data, replaces the special formatting with the data. For example, you could generate a form letter with somebody's name and address using a template. The special formatting information can be very simple, such as simple variables, or more complex with conditionals and loops.

This is a common technique for generating web pages using data from a database.

Wikipedia is not much help here: <http://en.wikipedia.org/wiki/Template_(software_engineering)>

--
Jim Gibson
j...@gibson.org

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to