in reply to Re: Best way to send records to the browser?
in thread Best way to send records to the browser?
Thanks for the help.
I'm really trying to keep my code out of my templates. In fact, that is why I opted to use TT2 in the first place. I have a web designer working on this project who doesn't understand TT2 or Perl.
It appears that other template tools (like Template::HTML) allow you to pass arrays to templates. I have written code code that basically builds an array of hashes. Its fairly compact. This would work for Template::HTML, but not for TT2.
I think I have to create a hash of hashes. Unfortunately, I'm not sure how to do this syntactically - and this is where I could use a little help.
Am I heading down the right path? My thought is to create a hash for each relevant record in the table. Then, I can create a hash of hashes to encompass all of the records. However, if I send the HoH to TT2, will it understand it? This is uncharted territory for me. Also, I'm not sure how the syntax works for building a HoH in Perl. I'm still researching this, but haven't figured it out (help appreciated).
I guess the other thing I could do is take my existing array of hashes and parse it with Perl to build one large hash. I'm sure this would work (I've done something similar in the past) but one would think there exists an easier (preferred) way to do all of this. Hence my post here for the Monks.
I really appreciate any further guidance you experts can offer me.
:-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Best way to send records to the browser?
by Your Mother (Archbishop) on Jun 26, 2010 at 16:17 UTC | |
by Perobl (Beadle) on Jun 26, 2010 at 17:26 UTC | |
by almut (Canon) on Jun 26, 2010 at 17:51 UTC | |
by Perobl (Beadle) on Jun 26, 2010 at 19:16 UTC | |
by almut (Canon) on Jun 26, 2010 at 19:45 UTC | |
| |
by Your Mother (Archbishop) on Jun 26, 2010 at 20:33 UTC | |
by Perobl (Beadle) on Jun 26, 2010 at 23:07 UTC |