When I've used Class::DBI with HTML::Template, I found it pretty easy to copy data from a list of objects into a hash structure that H::T could handle. I definitely was writing code to handle that translation, but that's the price you pay for the strong abstraction layer that H::T provides you. If you want a templating system that doesn't require you to arrange your data like this, Template Toolkit is happy to work on Class::DBI objects directly.
Well perrin I think you have hit it on the head. I thought again about my remarks on DB complexity. Perhaps Class::DBI is no more and no less capable of handling complex relationships than anything else. What I was complaining about was the translation, and I think a couple of suggestions have been made that I will ponder overnight.
As always, thanks for the insightful contribution.
John jdtoronto
PS: Template Toolkit is on my list of things to learn when this job is complete!
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|