From: Ilya Zakharevich Date: Thu, 7 Aug 1997 00:00:00 +0000 (+0000) Subject: Docs of IO::Handle [PATCH] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3370baa86a9c5eaafcef636b532b9519a44486b1;p=p5sagit%2Fp5-mst-13.2.git Docs of IO::Handle [PATCH] I was caught by the following errors in documentation: Enjoy, p5p-msgid: 199707222307.TAA08380@monk.mps.ohio-state.edu --- diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm index f270f3f..39e32f0 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 $fh->print("Some text\n"); } + use IO::Handle '_IOLBF'; $fh->setvbuf($buffer_var, _IOLBF, 1024); undef $fh; # automatically closes the file if it's open @@ -151,7 +152,8 @@ C<_IOLBF>, and C<_IONBF> for setvbuf()--except that the buffer parameter specifies a scalar variable to use as a buffer. WARNING: A variable used as a buffer by C or C must not be modified in any way until the IO::Handle is closed or C or C is called -again, or memory corruption may result! +again, or memory corruption may result! Note that you need to import +the constants C<_IOFBF>, C<_IOLBF>, and C<_IONBF> explicitly. Lastly, there is a special method for working under B<-T> and setuid/gid scripts: