sub O_ACCMODE () { O_RDONLY | O_RDWR | O_WRONLY }
-$VERSION = "0.97";
+$VERSION = "0.97_01";
my $DEFAULT_MEMORY_SIZE = 1<<21; # 2 megabytes
my $DEFAULT_AUTODEFER_THRESHHOLD = 3; # 3 records
my $DEFAULT_AUTODEFER_FILELEN_THRESHHOLD = 65536; # 16 disk blocksful
unless (seek $file, 1, SEEK_SET) {
croak "$pack: your filehandle does not appear to be seekable";
}
- seek $file, 0, SEEK_SET # put it back
+ seek $file, 0, SEEK_SET; # put it back
$fh = $file; # setting binmode is the user's problem
} elsif (ref $file) {
croak "usage: tie \@array, $pack, filename, [option => value]...";
if (@_) {
$unwritten = $self->_downcopy($data, $end, $_[1] - $end);
} else {
- # Make the file longer to accomodate the last segment that doesn'
+ # Make the file longer to accommodate the last segment that doesn'
$unwritten = $self->_downcopy($data, $end);
}
}
last if $writable eq "";
$self->_seekb($pos);
$self->_write_record($writable);
+ last if $last_read_was_short && $data eq "";
$len -= $readsize if defined $len;
$pos += $readsize;
}