tmaly has asked for the wisdom of the Perl Monks concerning the following question:

Monks

I am looking for advice on how to wrap an iterator object with the Tie Array interface. Specifically, I wanted some suggestions on how to handle the FETCHSIZE implementation when I do not know how many elements the iterator will return.

Best Regards
Ty

Replies are listed 'Best First'.
Re: Tie Array and Iterators
by Anonymous Monk on Jul 23, 2010 at 12:35 UTC
    Maybe you can get ideas from Tie::Array::Iterable

    how to handle the FETCHSIZE implementation when I do not know how many elements the iterator will return

    I'd return the current known size