On 4/20/07, Andy Wardley <[EMAIL PROTECTED]> wrote:
Yes, there is a difference in that you get an empty list rather than
an empty value.

I hadn't thought about it that way.   I looked a little more into
perl's splice() and I see that it returns undef if no values are
removed from the list -- so that would probably be more appropriate
for the change if it were going to occur.   Thanks for the workaround,
also.

John

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

Reply via email to