diff options
author | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-02-28 16:49:33 -0800 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-02-28 16:49:33 -0800 |
commit | a5f75d667838e8e7bb037880391f5c44476d33b4 (patch) | |
tree | 5005e888355c1508bc47da697efe119c1615b123 /ext/FileHandle | |
parent | 2920c5d2b358b11ace52104b6944bfa0e89256a7 (diff) | |
download | perl-a5f75d667838e8e7bb037880391f5c44476d33b4.tar.gz |
perl 5.002perl-5.002
[editor's note: changes seem to be mostly module updates,
documentation changes and some perl API macro additions]
Diffstat (limited to 'ext/FileHandle')
-rw-r--r-- | ext/FileHandle/FileHandle.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/FileHandle/FileHandle.pm b/ext/FileHandle/FileHandle.pm index d6832dbd0b..1d1fe18e53 100644 --- a/ext/FileHandle/FileHandle.pm +++ b/ext/FileHandle/FileHandle.pm @@ -32,6 +32,11 @@ FileHandle - supply object methods for filehandles undef $fh; # automatically closes the file } + $pos = $fh->getpos; + $fh->setpos $pos; + + $fh->setvbuf($buffer_var, _IOLBF, 1024); + ($readfh, $writefh) = FileHandle::pipe; autoflush STDOUT 1; @@ -60,6 +65,21 @@ C<FileHandle::fdopen> is like C<open> except that its first parameter is not a filename but rather a file handle name, a FileHandle object, or a file descriptor number. +If the C functions fgetpos() and fsetpos() are available, then +C<FileHandle::getpos> returns an opaque value that represents the +current position of the FileHandle, and C<FileHandle::setpos> uses +that value to return to a previously visited position. + +If the C function setvbuf() is available, then C<FileHandle::setvbuf> +sets the buffering policy for the FileHandle. The calling sequence +for the Perl function is the same as its C counterpart, including the +macros C<_IOFBF>, C<_IOLBF>, and C<_IONBF>, except that the buffer +parameter specifies a scalar variable to use as a buffer. WARNING: A +variable used as a buffer by C<FileHandle::setvbuf> must not be +modified in any way until the FileHandle is closed or until +C<FileHandle::setvbuf> is called again, or memory corruption may +result! + See L<perlfunc> for complete descriptions of each of the following supported C<FileHandle> methods, which are just front ends for the corresponding built-in functions: |