Actually, your database example wouldn't be a problem with the Template Toolkit. The TT comes with a number of 'plugins' that make interacting with various Perl features much easier. One of these is the DBI plugin.
What you would do is pass into the template, either the SQL to be executed or (more likely) some data to be used in the where clause of your SQL. The DBI plugin will connect to the database, execute the SQL and process the rows one at a time. At no time do you need to have all of the data in memory at once.
--
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: Re: Re: Effective ways to 'write' html.
by davorg
in thread Effective ways to 'write' html.
by zigster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |