Lines Matching refs:FileHandle
1 package FileHandle;
42 # Some people call "FileHandle::function", so all the functions
43 # that were in the old FileHandle class must be imported, too.
98 bless *STDIN{IO}, "FileHandle" if ref *STDIN{IO} eq "IO::Handle";
99 bless *STDOUT{IO}, "FileHandle" if ref *STDOUT{IO} eq "IO::Handle";
100 bless *STDERR{IO}, "FileHandle" if ref *STDERR{IO} eq "IO::Handle";
108 FileHandle - supply object methods for filehandles
112 use FileHandle;
114 $fh = new FileHandle;
120 $fh = new FileHandle "> FOO";
126 $fh = new FileHandle "file", "r";
132 $fh = new FileHandle "file", O_WRONLY|O_APPEND;
143 ($readfh, $writefh) = FileHandle::pipe;
151 C<FileHandle::new> creates a C<FileHandle>, which is a reference to a
153 parameters, they are passed to C<FileHandle::open>; if the open fails,
154 the C<FileHandle> object is destroyed. Otherwise, it is returned to
157 C<FileHandle::new_from_fd> creates a C<FileHandle> like C<new> does.
158 It requires two parameters, which are passed to C<FileHandle::fdopen>;
159 if the fdopen fails, the C<FileHandle> object is destroyed.
162 C<FileHandle::open> accepts one parameter or two. With one parameter,
168 If C<FileHandle::open> receives a Perl mode string (">", "+<", etc.)
172 If C<FileHandle::open> is given a numeric mode, it passes that mode
174 For convenience, C<FileHandle::import> tries to import the O_XXX
176 this may fail, but the rest of FileHandle will still work.
178 C<FileHandle::fdopen> is like C<open> except that its first parameter
179 is not a filename but rather a file handle name, a FileHandle object,
183 C<FileHandle::getpos> returns an opaque value that represents the
184 current position of the FileHandle, and C<FileHandle::setpos> uses
187 If the C function setvbuf() is available, then C<FileHandle::setvbuf>
188 sets the buffering policy for the FileHandle. The calling sequence
192 variable used as a buffer by C<FileHandle::setvbuf> must not be
193 modified in any way until the FileHandle is closed or until
194 C<FileHandle::setvbuf> is called again, or memory corruption may
198 supported C<FileHandle> methods, which are just front ends for the
211 supported C<FileHandle> methods:
252 There are many other functions available since FileHandle is descended