use strict;
use warnings;
-our $VERSION = q(1.0007);
+our $VERSION = q(1.0008);
use Fcntl qw( :flock );
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
use strict;
use warnings;
-our $VERSION = q(1.0007);
+our $VERSION = q(1.0008);
use Scalar::Util ();
});
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,
$return .= $/;
}
-eval{
SECTOR:
while ( $spot < $self->storage->{end} ) {
# Read each sector in order.
$spot += $sector->size;
}
}
-}; if ( $@ ) {
- return $return, $@;
-}
return $return;
}
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} ) ) ) {
use strict;
use warnings;
-our $VERSION = q(1.0007);
+our $VERSION = q(1.0008);
use Fcntl qw( :DEFAULT :flock :seek );
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;
}
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);
use strict;
use warnings;
-our $VERSION = q(1.0007);
+our $VERSION = q(1.0008);
use base 'DBM::Deep';