Thanks again, all! I have found the way to make fetchall_arrayref() act
as expected - good ol'
O'Reilly saves the day. To make
fetchall_arrayref() pass a reference to an array of references to
hashes (instead of a reference to an array of hashes - very subtle
diference, but error prone in this need): merely pass the method a
template hash to use internally as an example. i.e.:
my $arrayref = $sth->fetchall_arrayref({
FieldID =>1,
Fieldname2 =>1,
Fieldname3 =>1,
Fieldname4 =>1,
});
$template->param(table1 => $arrayref);
Update:Or even more simply:
my $arrayref = $sth->fetchall_arrayref({});
$template->param(table1 => $arrayref);
This worked exactly as expected and dropped both code size and execution
time dramaticly. Not to mention leaving me with HTML::Template's
standard HTML file style that my clients can mess with easily without
having to learn anything new. No sense re-writing the wheel, when it
does what it is supposed to - once i learned HOW it does it. Took a
bit of reading the source of the DBI and HTML libs though. Guess I
need to really brush up on passing of references for stuff like this.