Return a chunk of data of any size (could use $/ or not, it depends on you,
unlike getline which probably should respect the value of $/).
This avoids the annoying substr stuff you need to do with read.
Write out a string.
This is like a simplified print, which can disregard $, and $\ as well as multiple argument forms, and does not have the extra substr annoyance of write or syswrite.
If you provide a <B>singleB> reading related callback (__read, getline or read) then your callback will be used to implement all of the other reading primitives using a string buffer.
These implementations handle $/ in all forms (undef, ref to number and string), all the funny calling conventions for read, etc.
Any callback that can be defined purely in terms of other callbacks in a way will be added. For instance getc can be implemented in terms of read, say can be implemented in terms of print, print can be implemented in terms of write, write can be implemented in terms of print, etc.
None of these require special wrapping and will always be added if their dependencies are present.
When overloaded as a glob a tied handle will be returned. This allows you to use the handle in Perls IO builtins. For instance:
my $line = <$fh>
will not call the getline method natively, but the tied interface arranges for that to happen.
|perl v5.20.3||IO::HANDLE::PROTOTYPE::FALLBACK (3)||2009-09-29|