Revision history for DBM::Deep.
+1.0014 Jun 13 23:15:00 2008 EST
+ - (This version is compatible with 1.0013)
+ - Fix for RT#36781 (t/44 has an unrequired dependency)
+ - Start the process of optimization.
+
1.0013 Jun 13 23:15:00 2008 EST
- (This version is compatible with 1.0012)
- Fix for RT#30144 (Optimization failure on Win32)
my $engine = $self->engine;
unless ( $self->offset ) {
- my $leftover = $self->size - $self->base_size;
-
$self->{offset} = $engine->_request_blist_sector( $self->size );
- $engine->storage->print_at( $self->offset, $engine->SIG_BLIST ); # Sector type
- # Skip staleness counter
- $engine->storage->print_at( $self->offset + $self->base_size,
- chr(0) x $leftover, # Zero-fill the data
- );
+
+ my $string = chr(0) x $self->size;
+ substr( $string, 0, 1, $engine->SIG_BLIST );
+ $engine->storage->print_at( $self->offset, $string );
}
if ( $self->{key_md5} ) {
my $engine = $self->engine;
unless ( $self->offset ) {
- my $leftover = $self->size - $self->base_size;
-
$self->{offset} = $engine->_request_index_sector( $self->size );
- $engine->storage->print_at( $self->offset, $engine->SIG_INDEX ); # Sector type
- # Skip staleness counter
- $engine->storage->print_at( $self->offset + $self->base_size,
- chr(0) x $leftover, # Zero-fill the rest
- );
+
+ my $string = chr(0) x $self->size;
+ substr( $string, 0, 1, $engine->SIG_INDEX );
+ $engine->storage->print_at( $self->offset, $string );
}
return $self;
my $e = $self->engine;
unless ( $self->offset ) {
- $self->{staleness} = 0;
$self->{offset} = $e->_request_data_sector( $self->size );
my $class_offset = 0;
}
else {
$self->{type} = $e->storage->read_at( $self->offset, 1 );
-
- $self->{staleness} = unpack(
- $e->StP($DBM::Deep::Engine::STALE_SIZE),
- $e->storage->read_at( $self->offset + $e->SIG_SIZE, $DBM::Deep::Engine::STALE_SIZE ),
- );
}
+ $self->{staleness} = unpack(
+ $e->StP($DBM::Deep::Engine::STALE_SIZE),
+ $e->storage->read_at( $self->offset + $e->SIG_SIZE, $DBM::Deep::Engine::STALE_SIZE ),
+ );
+
return;
}