From: rkinyon Date: Sun, 9 Mar 2008 23:49:57 +0000 (+0000) Subject: Are we ready for release? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=77219d7a76b914406beb008ca4258df092d8ab2a;p=dbsrgits%2FDBM-Deep.git Are we ready for release? --- diff --git a/lib/DBM/Deep.pm b/lib/DBM/Deep.pm index 54a2638..36a40a4 100644 --- a/lib/DBM/Deep.pm +++ b/lib/DBM/Deep.pm @@ -5,7 +5,7 @@ use 5.006_000; use strict; use warnings; -our $VERSION = q(1.0007); +our $VERSION = q(1.0008); use Fcntl qw( :flock ); diff --git a/lib/DBM/Deep/Array.pm b/lib/DBM/Deep/Array.pm index 7522549..e12e7c9 100644 --- a/lib/DBM/Deep/Array.pm +++ b/lib/DBM/Deep/Array.pm @@ -5,7 +5,7 @@ use 5.006_000; use strict; use warnings; -our $VERSION = q(1.0007); +our $VERSION = q(1.0008); # This is to allow DBM::Deep::Array to handle negative indices on # its own. Otherwise, Perl would intercept the call to negative diff --git a/lib/DBM/Deep/Engine.pm b/lib/DBM/Deep/Engine.pm index 7d7363d..a6d69b6 100644 --- a/lib/DBM/Deep/Engine.pm +++ b/lib/DBM/Deep/Engine.pm @@ -5,7 +5,7 @@ use 5.006_000; use strict; use warnings; -our $VERSION = q(1.0007); +our $VERSION = q(1.0008); use Scalar::Util (); @@ -134,11 +134,6 @@ sub read_value { }); unless ( $value_sector ) { - # On Win32, we have to release the shared lock and acquire - # an exclusive lock in order to do any writing. We cannot - # just upgrade the shared lock to an exclusive lock because - # ::File::lock() doesn't let us (yet). -RobK, 2007-11-15 - $self->storage->unlock; $self->storage->lock; $value_sector = DBM::Deep::Engine::Sector::Null->new({ engine => $self, data => undef, @@ -929,7 +924,6 @@ sub _dump_file { $return .= $/; } -eval{ SECTOR: while ( $spot < $self->storage->{end} ) { # Read each sector in order. @@ -984,9 +978,6 @@ eval{ $spot += $sector->size; } } -}; if ( $@ ) { - return $return, $@; -} return $return; } @@ -2131,7 +2122,6 @@ sub get_data_location_for { my ($loc, $staleness) = unpack( $StP{$e->byte_size} . ' ' . $StP{$STALE_SIZE}, $buffer ); # XXX Merge the two if-clauses below - if ( $args->{trans_id} ) { # We have found an entry that is old, so get rid of it if ( $staleness != (my $s = $e->get_txn_staleness_counter( $args->{trans_id} ) ) ) { diff --git a/lib/DBM/Deep/File.pm b/lib/DBM/Deep/File.pm index 612c6eb..c81b3f5 100644 --- a/lib/DBM/Deep/File.pm +++ b/lib/DBM/Deep/File.pm @@ -5,7 +5,7 @@ use 5.006_000; use strict; use warnings; -our $VERSION = q(1.0007); +our $VERSION = q(1.0008); use Fcntl qw( :DEFAULT :flock :seek ); @@ -110,7 +110,7 @@ sub print_at { seek( $fh, $loc + $self->{file_offset}, SEEK_SET ); } - print( $fh @_ ) or die "Internal Error (print_at): $!\n"; + print( $fh @_ ) or die "Internal Error (print_at($loc)): $!\n"; return 1; } @@ -165,9 +165,9 @@ sub lock { if (!defined($self->{fh})) { return; } - #XXX This needs to allow for upgrading a shared lock to an - # exclusive lock. q.v. the comment in read_value when - # autovivifying. -RobK, 2007-11-15 + #XXX This either needs to allow for upgrading a shared lock to an + # exclusive lock or something else with autovivification. + # -RobK, 2008-03-09 if ($self->{locking}) { if (!$self->{locked}) { flock($self->{fh}, $type); diff --git a/lib/DBM/Deep/Hash.pm b/lib/DBM/Deep/Hash.pm index c152b22..0ee6fca 100644 --- a/lib/DBM/Deep/Hash.pm +++ b/lib/DBM/Deep/Hash.pm @@ -5,7 +5,7 @@ use 5.006_000; use strict; use warnings; -our $VERSION = q(1.0007); +our $VERSION = q(1.0008); use base 'DBM::Deep';