logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: WHILE bug-o-feature: msg#00031

Subject: Re: WHILE bug-o-feature
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"



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>