DbFramework::Template - Fill template with database values |
DbFramework::Template - Fill template with database values
use DbFramework::Template; $t = new DbFramework::Template($template,\@tables); print $t->fill; $t->default($table); $t->template->set_text($template);
DbFramework::Template is a class for filling templates with values from a database.
The following list describes the placeholders allowed in a template.
In each case %values relates to the hash passed to the fill()
method.
DbFramework::Util
new($template,\@tables)
Create a new DbFramework::Template object. $template is the template to be filled. @tables are the DbFramework::Table objects required for filling the template.
template()
Returns the Text::FillIn object associated with the template.
fill(\%values)
Returns a filled template. The values in %values are used to fill certain placeholders in the template (see Template placeholders.)
default($table)
$table is a DbFramework::Table object. Sets up a default template consisting of all fields in $table.
the Text::FillIn manpage and the DbFramework::Util manpage.
Paul Sharpe <paul@miraclefish.com>
Copyright (c) 1999 Paul Sharpe. England. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
DbFramework::Template - Fill template with database values |