Based on your example below, are you thinking of something like
Template::Plugin::DBI (as used in Template::Toolkit)? ie: see examples
Close. Yes a glue layer between HTML::Template and a database. I
could try to use some of these higher layer abstractions (including
Rose:DB) or use a modern DBI layer with its
primay_key/primary_key_info/foreign_key_info functions ...
I am looking to generate easy visualizations of
objects serialized in a database USING the underlying model.
It sounds like you're talking about a glue between "model" components
like dbix::class, class::dbi, etc?
Alternatively, have you looked at HTML::FillInForm?
If so, (IMO) H::T wasn't designed to be pluggable/extensible in that
way. However, that hasn't stopped a number of users
extending/modifying the H::T codebase in various ways, ie: I use a
version which allows me to subclass H::T (or H::T::E) so that I can
extend the tag syntax. From memory, I think someone else on this list
has hooked together H::T and HTML::FillInForm.
<li />Title is "<TMPL_VAR NAME=".title">"
<li />ISBN is <TMPL_VAR NAME=".isbn">
<li />Authors are:
<!-- name below is shorthand for +books.book_id.authors -->
<!-- could still be abbreviated to +authors if fk's link
<TMPL_LOOP NAME=".book_id.authors:ORDER_BY:.last_name,.first_name" >
<li /><TMPL_VAR NAME=".last_name">, <TMPL_VAR
In your example above, I would subclass H::T to handle the following
(or something similar):
...<TMPL_SQL_LOOP NAME="authors" WHERE="book_id =
books.book_id" ORDER_BY="last_name, first_name">