INTERFACE

Get the new chunk with items. Chunk is an arrayref with items, ordered as if read() was invoked several times.

$limit is a recommendation. Most input streams respect it and return exactly this number of items in chunk, but some don't. So if you get a chunk with 1 item when you asked for 5, don't treat it as a sign that you don't need to read further. Read until you get an undef or an empty chunk.

commit()

Commit input stream's position.

Generally, successful commit means that you can restart your program and continue from the same position next time. Although some streams don't support position at all, for example, array_in from Stream::Simple.

Stream's author should make sure that stream is still readable after this.

SEE ALSO

Flux::In::Role::Easy - specialization of this role for those who don't want to bother with 3 methods, and want to just implement read().