P is for Practical | |
PerlMonks |
Fetchall_Answer Returnsby growlf (Pilgrim) |
on Mar 03, 2002 at 13:15 UTC ( [id://148977]=perlquestion: print w/replies, xml ) | Need Help?? |
growlf has asked for the wisdom of the Perl Monks concerning the following question: In the spirit of using HTML::Template with CGI and DBI, I am wanting to output a table that is of unknown dimensions at runtime, while still keeping the CGI portion and HTML portion as separate as possible so as to allow the 2 developer sets to work independently (and to ease maintenance as well, since we seem to have a plethora of *gack* FP-Happy html types in our company and far too few Perl writers). I once wrote an article on using the HTML::Template with DBI that was a good answer for the time - but now I think I must either create my own solution, or find a better one that already exists. An example of my needs: given a dataset that can be any number of rows by any number of columns, output the appropriate HTML table in the HTML template and have it render it without resorting to embedding any static HTML into my CGI Script. The template handles a static sized dataset thusly (and quite nicely too):
along with this HTML:
Is there a way to do this with a dynamic dataset, with changing numbers of both rows and columns?
Back to
Seekers of Perl Wisdom
|
|