jdtoronto has asked for the wisdom of the Perl Monks concerning the following question:
Esteemed Monks,
I am using HTML::Template in an application where I would like pass it a hash of hashes. Sadly, it doesnt support this type of structure.
Has anyone out there a module, or even a subroutine, that will parse a hash of hashes into a set of heirarchical template variables?
The alternative is to write something that "flattens" out the data, but this would be rather "not general purpose" which is what I would prefer.
My structure looks like this (it is only a part of a much larger structure):
jdtoronto$VAR1 = { 'apptimeupdated' => '20040315145142', 'appdate' => '2004-03-15', 'personellid' => '0', 'appscref' => '', 'apptime' => '16:45:00', 'appdesc' => '', 'appid' => '270', 'apptype' => { 'taxlc' => '0', 'apt_requ_qual' => '', 'apt_abbr_desc' => '001', 'taxst' => '0', 'apt_defstatus' => { 'name' => 'Pending', 'css_class' => 'pending' +, 'id' => '1', 'graphic' => '/images/te +nt.jpg' }, 'taxfed' => '0', 'value' => '50', 'apt_full_desc' => 'Round, regular - 18 holes +', 'apt_requ_prepay' => '1', 'apt_requ_option' => '', 'providerid' => '4', 'id' => '1' }, 'appamountpaid' => '0', }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: HTML::Template and hashes of hashes
by jeffa (Bishop) on Mar 15, 2004 at 22:19 UTC | |
by jdtoronto (Prior) on Mar 16, 2004 at 01:29 UTC | |
Re: HTML::Template and hashes of hashes
by blokhead (Monsignor) on Mar 16, 2004 at 02:17 UTC | |
by jdtoronto (Prior) on Mar 16, 2004 at 16:06 UTC |
Back to
Seekers of Perl Wisdom