| Previous | Next
PerlIO::ViaA helper class for PerlIO layers implemented in Perl. PerlIO::Via ships with the Perl 5.8 source kit. For example, you can use PerlIO::Via to call #!/usr/local/bin/perl -w; use MIME::Base64; open(my $fh, ">Via(MIME::Base64)", "encode_base64"); PerlIO::Via implements the following methods.
CLOSE(fh) Returns on success and
EOF(fh) Returns end-of-file state. The default behavior is to return a value of
ERROR(fh) Returns error state.
FILENO(fh) Returns a numeric value that represents the Unix-like file descriptor, or
FILL(fh) Returns a string that will be placed in the buffer.
FLUSH(fh) Flushes any buffered write data. Returns on success and
POPPED([fh]) Removes a layer from PerlIO::Via.
$class->PUSHED([mode [,fh]]) Returns an object or the class, or
READ(buffer, len, fh) Returns the number of octets in buffer, which must be less than or equal to
SEEK(posn, where, fh) Returns on success and
TELL(fh) Returns the file position, without an available default.
UNREAD(buffer, fh) Returns the number of octets from bufferthat have been successfully saved.
WRITE(buffer, fh) Returns the number of octets in buffer that have been written. |