Robin Szemeti wrote:
> It seem T::T automagically assumes that if you pass it a reference to
> something then you probably didn;t want that, you prolly 
> wanted the thingy itself so it dereferences it for you.. it will
> only do this down one level.
> so by passing it a list of references it sees a list .. does a foreach
> down them and then sees what it gets (in this case an array 
> ref ) .. it dereferences that and bingo you can now access the row
> of stuff.
> however when the list jsut contains 1 item, it sees a reference to an
> array ( whicj is the row) and then proceeds to do a foreach over the
> elements of the row ..

Reminds me of fits I had when doing Vignette/Tcl with lists of lists that I
passed to another template with HTTP POST. When the list of lists contained
only one element, it didn't wrap that list in extra {} so the foreach say a
list of lists all right -- but the "sublists" were only one element long
(since {} are optional around lists if there are not spaces). Caused me a
bit of a headache, too. I finally settled on looking at the llength of the
first element, and if it's only one, assuming that the big list only had one
element (if the llength was 5, then I was fine, since the sublists were
supposed to have five element).

Philip Newton <[EMAIL PROTECTED]>
All opinions are my own, not my employer's.
If you're not part of the solution, you're part of the precipitate.

Reply via email to