summaryrefslogtreecommitdiff
path: root/ext/PerlIO
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-11-21 14:34:43 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-21 14:34:43 +0000
commitf74ea4776e8f7838623c0e4d5effcde81203f723 (patch)
tree75b239881a85305b9409006bd2b121f3ab047f93 /ext/PerlIO
parentbc4a802281a70ea00ca5309bf91bd291a773c6ab (diff)
downloadperl-f74ea4776e8f7838623c0e4d5effcde81203f723.tar.gz
Small doc tweaks.
p4raw-id: //depot/perl@13165
Diffstat (limited to 'ext/PerlIO')
-rw-r--r--ext/PerlIO/Via/Via.pm22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/PerlIO/Via/Via.pm b/ext/PerlIO/Via/Via.pm
index 38336f4dad..07c0876e03 100644
--- a/ext/PerlIO/Via/Via.pm
+++ b/ext/PerlIO/Via/Via.pm
@@ -24,8 +24,8 @@ It refers to the layer below. I<$fh> is not passed if the layer
is at the bottom of the stack, for this reason and to maintain
some level of "compatibility" with TIEHANDLE classes it is passed last.
-As an example, in Perl release 5.8.0 the MIME::QuotedPrint module
-defines the required TIEHANDLE methods so that you can say
+As an example, in Perl release 5.8.0 the included MIME::QuotedPrint
+module defines the required TIEHANDLE methods so that you can say
use MIME::QuotedPrint;
open(my $fh, ">Via(MIME::QuotedPrint)", "qp");
@@ -34,8 +34,8 @@ defines the required TIEHANDLE methods so that you can say
=item $class->PUSHED([$mode][,$fh])
-Should return an object or the class. (Compare TIEHANDLE.)
-Mandatory.
+Should return an object or the class, or undef on failure.
+(Compare TIEHANDLE.) Mandatory.
=item $obj->POPPED([$fh])
@@ -81,17 +81,18 @@ Optional.
=item $obj->SEEK($posn,$whence,$fh)
Should return 0 on success, -1 on error.
-Optional. Default is to fail, but that is likely to be changed.
+Optional. Default is to fail, but that is likely to be changed
+in future.
=item $obj->TELL($fh)
Returns file postion.
-Optional. Default to be determined.
+Optional. Default to be determined.
=item $obj->UNREAD($buffer,$fh)
Returns the number of octets from buffer that have been sucessfully
-saved to be returned on future FILL/READ calls. Optional. Default is
+saved to be returned on future FILL/READ calls. Optional. Default is
to push data into a temporary layer above this one.
=item $obj->FLUSH($fh)
@@ -127,10 +128,10 @@ Given the following module, Hex.pm:
sub PUSHED
{
- my ($class,$mode) = @_;
+ my ($class,$mode,$fh) = @_;
# When writing we buffer the data
- my $write = '';
- return bless \$write,$class;
+ my $buf = '';
+ return bless \$buf,$class;
}
sub FILL
@@ -138,7 +139,6 @@ Given the following module, Hex.pm:
my ($obj,$fh) = @_;
my $line = <$fh>;
return (defined $line) ? pack("H*", $line) : undef;
- return undef;
}
sub WRITE