Perl Monk, Perl Meditation | |
PerlMonks |
Re^4: HTML::Template with HTML::Pagerby flyby (Acolyte) |
on Oct 09, 2013 at 20:46 UTC ( [id://1057623]=note: print w/replies, xml ) | Need Help?? |
It's an array of hash refs. That's how you get the named fields out.
That's looped over a bunch of test data and then fed to get_data_callback as $data. It's just test junk but works as expected.
produces the correct data stored in the hashref listed above. The documentation doesn't mention the ability to pass as hash to get_data_callback so I'm not sure how/if that would work. I've also been poking over the Pager.pm code between work issues but nothing has jumped out at me yet. It seems like either it's not possible or it's just not in the code because it's a default or obvious how it's suppose to work. Just not obvious to me. :) thanks for looking, -Matt -- And this works -- Gen some random headers and add them to an array of hashrefs:
Make the primary array of hashrefs:
Create the HTML::Template setup:
Add the header array of hashrefs to the template. Might be able to do this at the same time as you create the $template.. but for some reason it didn't work the first time I tried it.
That works with this Template:
Gives me the correct <TH></TH> headers I want. Cool beans. -Matt
In Section
Seekers of Perl Wisdom
|
|