summaryrefslogtreecommitdiff
path: root/lib/Tie
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-18 15:58:00 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-18 15:58:00 +0000
commit289515990248143545c2f83ce9b614619ef34ee4 (patch)
tree67ca082f57bf0d9dbfd403e0fa27225514d2e023 /lib/Tie
parentb70ed18fa8493b06bb300129a656c21afeceb9c3 (diff)
downloadperl-289515990248143545c2f83ce9b614619ef34ee4.tar.gz
Upgrade to Tie::File 0.50.
p4raw-id: //depot/perl@15302
Diffstat (limited to 'lib/Tie')
-rw-r--r--lib/Tie/File.pm10
-rw-r--r--lib/Tie/File/t/00_version.t2
-rw-r--r--lib/Tie/File/t/32_defer_misc.t6
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/Tie/File.pm b/lib/Tie/File.pm
index ec9a8207c7..92d16ce9a1 100644
--- a/lib/Tie/File.pm
+++ b/lib/Tie/File.pm
@@ -5,7 +5,7 @@ use POSIX 'SEEK_SET';
use Fcntl 'O_CREAT', 'O_RDWR', 'LOCK_EX';
require 5.005;
-$VERSION = "0.21";
+$VERSION = "0.50";
my $DEFAULT_MEMORY_SIZE = 1<<21; # 2 megabytes
my %good_opt = map {$_ => 1, "-$_" => 1}
@@ -318,9 +318,9 @@ sub EXTEND {
sub DELETE {
my ($self, $n) = @_;
- $self->_delete_deferred($n) if $self->{defer};
my $lastrec = $self->FETCHSIZE-1;
my $rec = $self->FETCH($n);
+ $self->_delete_deferred($n) if $self->{defer};
if ($n == $lastrec) {
$self->_seek($n);
$self->_chop_file;
@@ -960,7 +960,7 @@ Tie::File - Access the lines of a disk file via a Perl array
=head1 SYNOPSIS
- # This file documents Tie::File version 0.21
+ # This file documents Tie::File version 0.50
tie @array, 'Tie::File', filename or die ...;
@@ -1486,7 +1486,7 @@ any news of importance, will be available at
=head1 LICENSE
-C<Tie::File> version 0.21 is copyright (C) 2002 Mark Jason Dominus.
+C<Tie::File> version 0.50 is copyright (C) 2002 Mark Jason Dominus.
This library is free software; you may redistribute it and/or modify
it under the same terms as Perl itself.
@@ -1514,7 +1514,7 @@ For licensing inquiries, contact the author at:
=head1 WARRANTY
-C<Tie::File> version 0.21 comes with ABSOLUTELY NO WARRANTY.
+C<Tie::File> version 0.50 comes with ABSOLUTELY NO WARRANTY.
For details, see the license.
=head1 THANKS
diff --git a/lib/Tie/File/t/00_version.t b/lib/Tie/File/t/00_version.t
index 5d950b9c20..ce8c96499c 100644
--- a/lib/Tie/File/t/00_version.t
+++ b/lib/Tie/File/t/00_version.t
@@ -2,7 +2,7 @@
print "1..1\n";
-my $testversion = "0.21";
+my $testversion = "0.50";
use Tie::File;
if ($Tie::File::VERSION != $testversion) {
diff --git a/lib/Tie/File/t/32_defer_misc.t b/lib/Tie/File/t/32_defer_misc.t
index 8e6edf94a4..9508ce4652 100644
--- a/lib/Tie/File/t/32_defer_misc.t
+++ b/lib/Tie/File/t/32_defer_misc.t
@@ -101,16 +101,16 @@ $del = delete $a[3]; # shortens file!
check_contents("0$:1$:2$:"); # deferred writes NOT flushed
expect($a[3], undef);
expect($a[2], "");
-exoect($del, "3");
+expect($del, "3");
$a[2] = "cookies";
$del = delete $a[2]; # shortens file!
expect($a[2], undef);
-exoect($del, 'cookies');
+expect($del, 'cookies');
check_contents("0$:1$:");
$a[0] = "crackers";
$del = delete $a[0]; # file unchanged
expect($a[0], "");
-exoect($del, 'crackers');
+expect($del, 'crackers');
check_contents("0$:1$:"); # no change yet
$o->flush;
check_contents("$:1$:"); # record 0 is NOT 'cookies';