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");
=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])
=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)
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
my ($obj,$fh) = @_;
my $line = <$fh>;
return (defined $line) ? pack("H*", $line) : undef;
- return undef;
}
sub WRITE