|Pathologically Eclectic Rubbish Lister|
Trouble with TMPL_LOOP assignmentby spork (Monk)
|on Oct 18, 2002 at 16:07 UTC||Need Help??|
spork has asked for the
wisdom of the Perl Monks concerning the following question:
I can't figure out what I am doing wrong and so I turn to the monks....
I have a function (see below) that prepares and calls the results of a SQL SELECT for an HTML::Template TMPL_LOOP. The function passes the SQL statement to another function which does the database lookup and returns an array of hashes (each column = 1 hash key). The function below refines the data a bit more (resolves table references into something more understandable for humans) and passes the refined array of hash references onto HTML::Template.
For some strange reason the assignment of the array to the appropriate TMPL_LOOP gives me a 500 error (notated in the code as the line that give me angst). If I comment out this line the page is served without issue (albeit without the results of the SELECT statement).
I put in some diagnostics to make sure there weren't any problems with the array of hash refs just before the assignment and all looked fine. I successfully use TMPL_LOOP in several places throughout my entire script and the syntax is the same everywhere, but this is the only place it seems to be broken.
NOTES: GetListFromDB does the SQL calls and returns the original array of hashes and GetItemFromDB resolves coded entries to strings. If it would help to see them let me know and I will post them. Thank you
I await absolution....