summaryrefslogtreecommitdiff
path: root/ext/IO
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-05-29 08:11:42 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-05-29 08:11:42 +0000
commit284196a30160ee3fc7affa3eed3ebbd21309fd83 (patch)
treed4864f3770a2d228281d331d47ac71702050e284 /ext/IO
parent2a131c5608d7d7e760535404c64de951bb363fad (diff)
downloadperl-284196a30160ee3fc7affa3eed3ebbd21309fd83.tar.gz
Document that setvbuf() is not probably any more available.
Many reports, most recently by mjd in [perl #22339] IO::Handle::setvbuf not defined properly p4raw-id: //depot/perl@19631
Diffstat (limited to 'ext/IO')
-rw-r--r--ext/IO/lib/IO/Handle.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm
index 81bec5a6c1..29b83165a2 100644
--- a/ext/IO/lib/IO/Handle.pm
+++ b/ext/IO/lib/IO/Handle.pm
@@ -20,6 +20,7 @@ IO::Handle - supply object methods for I/O handles
$io->print("Some text\n");
}
+ # setvbuf is not available by default on Perls 5.8.0 and later.
use IO::Handle '_IOLBF';
$io->setvbuf($buffer_var, _IOLBF, 1024);
@@ -193,6 +194,10 @@ C<_IOLBF>, and C<_IONBF> for setvbuf()--except that the buffer parameter
specifies a scalar variable to use as a buffer. You should only
change the buffer before any I/O, or immediately after calling flush.
+WARNING: The IO::Handle::setvbuf() is not available by default on
+Perls 5.8.0 and later because setvbuf() is rather specific to using
+the stdio library, while Perl prefers the new perlio subsystem instead.
+
WARNING: A variable used as a buffer by C<setbuf> or C<setvbuf> B<must not
be modified> in any way until the IO::Handle is closed or C<setbuf> or
C<setvbuf> is called again, or memory corruption may result! Remember that