John Ingram wrote:
The behavior of the splice vmethod seems to differ slightly from
Perl's splice() in one minor way that I've seen.
Yes, there is a difference in that you get an empty list rather than
an empty value.
One workaround is to add an "AND item.size" condition at the end:
[% WHILE (item = mylist.splice(0,2)) AND item.size %]
I'll have a think about the implications of changing the vmethod to
return an empty value. But either way, it'll be something for TT3.
Cheers
A
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates