OK .. this ones driving me dippy ..

I'm playing with Template::Toolkit with a bit of MySQL and the usual
things ... so I wrote a few functions that retreive lists of err stuff.
for speed i use dbi's fetchall_arrayref which returns a reference to an
array of references to arrays ...uh huh I dereference it and pass
the resulting array back out to my template for use in a 
[% FOREACH item = getItemList(category) %]
because the array is full of references to arrays I then access each
itemid as [% item.0 %]
this works fine if the function returns a list with more than one thing
in it .. if there is only one thing in the array I get a 'dont know how
to access [ 3 ].0  if for example item 3 is returned.

if I access the result as just plain [% item %] it works fine if there is
one item in the list .. and returns lots of ARRAY0x1241234 if there is
more than one ...

its almost as if someone has infected it with a variant of sub::approx
and its making some wild guesses about what its supposed to be doing and
guessing different things in different situations .. either way its
driving me dippy.

any ideas on how to tell the thing to stop trying to second guess what I
want or guess right each time?

Robin Szemeti

The box said "requires windows 95 or better"
So I installed Linux!

Reply via email to