In a perl module I open a connection to a DB, prepare a statement and then provide a subroutine to the template which exposes the prepared statement handle.
In the template, I am trying [% FOREACH item = sth().execute %] ... [% END %] but rather than returning a list it seems to be returning the number of items, which looks like a scalar/list context issue. Presumably there's some way to do what I'm trying? I'd much rather have the database set-up in a module rather than with [% USE DBI %]. I looked through Template::Plugin::DBI for clues but didn't find any (although I'm not using Template::Plugin::DBI). Thanks, Paul -- Paul Makepeace ....................................... http://paulm.com/ "What is the meaning of life? A doctor should never apologise." -- http://paulm.com/toys/surrealism/
