debian man page for io::handle::iterator

Query: io::handle::iterator

OS: debian

Section: 3pm

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

IO::Handle::Iterator(3pm)				User Contributed Perl Documentation				 IO::Handle::Iterator(3pm)

NAME
IO::Handle::Iterator - Iterator based read handle
SYNOPSIS
IO::Handle::Iterator->new(sub { return $next_line; # or undef on eof });
DESCRIPTION
This class lets you define a read handle with a few fallback methods (like "read") using a single callback that behaves like "getline". This is similar but much simpler than: IO::Handle::Prototype::Fallback->new( __read => sub { ... }, ); The reason being that the IO::Handle::Prototype::Fallback implementation will try its very best to behave correctly (i.e. respect the value of $/), whereas this implementation assumes it's fine to return things that aren't exactly lines from "getline", so the values are just passed through.
READ BUFFERING
When a method that requires buffering is invoked the handle is reblessed to a subclass which handles buffering. Calling "getline" again on this object will return the value of the buffer and return to the normal iterator class. perl v5.10.1 2009-09-29 IO::Handle::Iterator(3pm)
Related Man Pages
tap::parser::sourcehandler::handle5.18(3pm) - mojave
tap::parser::iterator5.18(3pm) - mojave
tap::parser::sourcehandler::handle(3pm) - mojave
tap::parser::sourcehandler::handle(3) - centos
dbm::deep::iterator::file::index(3pm) - debian
Similar Topics in the Unix Linux Community
awk or sed - Convert 2 lines to 1 line
Is UNIX an open source OS ?
One instance of comparing grep and awk
Find columns in a file based on header and print to new file
A (ksh) Library For and From UNIX.com