From: Jarkko Hietaniemi Date: Mon, 18 Mar 2002 15:58:00 +0000 (+0000) Subject: Upgrade to Tie::File 0.50. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=289515990248143545c2f83ce9b614619ef34ee4;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Tie::File 0.50. p4raw-id: //depot/perl@15302 --- diff --git a/lib/Tie/File.pm b/lib/Tie/File.pm index ec9a820..92d16ce 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 version 0.21 is copyright (C) 2002 Mark Jason Dominus. +C 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 version 0.21 comes with ABSOLUTELY NO WARRANTY. +C 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 5d950b9..ce8c964 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 8e6edf9..9508ce4 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';