On Mon, 12 Apr 2004, Aleksandr Guidrevitch wrote:

> Thanks Dave for a good try, but I have my
> own iterator (similar to Class::DBI::Iterator),
> which returns next value only by calling iterator.next,
> so it wouldn't work.

Well if it's your own iterator, why not add a C<size> method so that you 
can use one of the earlier suggestions ?

Or you could use the C<defined> vmethod and C<LAST> :

[% WHILE 1;
   bvar = avar.shift;
   LAST UNLESS bvar.defined %][% bvar %][% END %]

Which is not very elegant I'll admit :-)

Simon.

-- 
"So cool it would fluster a Vegan snow lizard"
 



_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to