From: rkinyon@cpan.org Date: Thu, 19 Jun 2008 14:37:07 +0000 (+0000) Subject: Conversion is partially complete. Lots of tests are failing, though X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a8d2331cc73fbd01c76cadf96de185493558b321;p=dbsrgits%2FDBM-Deep.git Conversion is partially complete. Lots of tests are failing, though git-svn-id: http://svn.ali.as/cpan/trunk/DBM-Deep@3593 88f4d9cd-8a04-0410-9d60-8f63309c3137 --- diff --git a/lib/DBM/Deep.pm b/lib/DBM/Deep.pm index 8572137..7beb838 100644 --- a/lib/DBM/Deep.pm +++ b/lib/DBM/Deep.pm @@ -465,7 +465,7 @@ sub STORE { ## my $self = shift->_get_self; my ($key, $value) = @_; - warn "STORE($self, $key, $value)\n" if DEBUG; + warn "STORE($self, $key, @{[defined$value?$value:'undef']})\n" if DEBUG; unless ( $self->_engine->storage->is_writable ) { $self->_throw_error( 'Cannot write to a readonly filehandle' ); diff --git a/lib/DBM/Deep/Engine.pm b/lib/DBM/Deep/Engine.pm index 746736d..bb299e7 100644 --- a/lib/DBM/Deep/Engine.pm +++ b/lib/DBM/Deep/Engine.pm @@ -877,6 +877,39 @@ sub _request_sector { ################################################################################ +sub dirty_sectors { + my $self = shift; + return $self->{dirty_sectors} ||= {}; +} + +sub add_dirty_sector { + my $self = shift; + my ($sector) = @_; + +# if ( exists $self->dirty_sectors->{ $sector->offset } ) { +# DBM::Deep->_throw_error( "We have a duplicate sector!! " . $sector->offset ); +# } + + $self->dirty_sectors->{ $sector->offset } = $sector; +} + +sub clear_dirty_sectors { + my $self = shift; + $self->{dirty_sectors} = {}; +} + +sub flush { + my $self = shift; + + for (values %{ $self->dirty_sectors }) { + $_->flush; + } + + $self->clear_dirty_sectors; +} + +################################################################################ + sub lock_exclusive { my $self = shift; my ($obj) = @_; @@ -892,7 +925,12 @@ sub lock_shared { sub unlock { my $self = shift; my ($obj) = @_; - return $self->storage->unlock( $obj ); + + my $rv = $self->storage->unlock( $obj ); + + $self->flush if $rv; + + return $rv; } ################################################################################ @@ -951,6 +989,9 @@ sub _dump_file { my $return = ""; + # Filesize + $return .= "Size: " . (-s $self->storage->{fh}) . $/; + # Header values $return .= "NumTxns: " . $self->num_txns . $/; diff --git a/lib/DBM/Deep/Engine/Sector.pm b/lib/DBM/Deep/Engine/Sector.pm index 5c9f3bc..990d357 100644 --- a/lib/DBM/Deep/Engine/Sector.pm +++ b/lib/DBM/Deep/Engine/Sector.pm @@ -10,7 +10,18 @@ use Scalar::Util (); sub new { my $self = bless $_[1], $_[0]; Scalar::Util::weaken( $self->{engine} ); + + if ( $self->offset ) { + $self->{string} = $self->engine->storage->read_at( + $self->offset, $self->size, + ); + } + else { + $self->{string} = chr(0) x $self->size; + } + $self->_init; + return $self; } @@ -19,7 +30,7 @@ sub new { sub engine { $_[0]{engine} } sub offset { $_[0]{offset} } -sub type { $_[0]{type} } +sub type { $_[0]{type} } sub base_size { my $self = shift; @@ -32,11 +43,21 @@ sub free { my $e = $self->engine; - $e->storage->print_at( $self->offset, $e->SIG_FREE ); - # Skip staleness counter - $e->storage->print_at( $self->offset + $self->base_size, - chr(0) x ($self->size - $self->base_size), - ); + $self->write( 0, $e->SIG_FREE ); + $self->write( $self->base_size, chr(0) x ($self->size - $self->base_size) ); + + $e->flush; + +# $e->storage->print_at( $self->offset, $e->SIG_FREE ); +# # Skip staleness counter +# $e->storage->print_at( $self->offset + $self->base_size, +# chr(0) x ($self->size - $self->base_size), +# ); + + #TODO When freeing two sectors, we cannot flush them right away! This means the following: + # 1) The header has to understand about unflushed items. + # 2) Loading a sector has to go through a cache to make sure we see what's already been loaded. + # 3) The header should be cached. my $free_meth = $self->free_meth; $e->$free_meth( $self->offset, $self->size ); @@ -44,5 +65,35 @@ sub free { return; } +sub read { + my $self = shift; + my ($start, $length) = @_; + if ( $length ) { + return substr( $self->{string}, $start, $length ); + } + else { + return substr( $self->{string}, $start ); + } +} + +sub write { + my $self = shift; + my ($start, $text) = @_; + + substr( $self->{string}, $start, length($text) ) = $text; + + $self->mark_dirty; +} + +sub mark_dirty { + my $self = shift; + $self->engine->add_dirty_sector( $self ); +} + +sub flush { + my $self = shift; + $self->engine->storage->print_at( $self->offset, $self->{string} ); +} + 1; __END__ diff --git a/lib/DBM/Deep/Engine/Sector/BucketList.pm b/lib/DBM/Deep/Engine/Sector/BucketList.pm index 008aa1e..b3bd6b2 100644 --- a/lib/DBM/Deep/Engine/Sector/BucketList.pm +++ b/lib/DBM/Deep/Engine/Sector/BucketList.pm @@ -1,4 +1,3 @@ -#TODO: Convert this to a string package DBM::Deep::Engine::Sector::BucketList; use 5.006_000; @@ -17,9 +16,7 @@ sub _init { unless ( $self->offset ) { $self->{offset} = $engine->_request_blist_sector( $self->size ); - my $string = chr(0) x $self->size; - substr( $string, 0, 1, $engine->SIG_BLIST ); - $engine->storage->print_at( $self->offset, $string ); + $self->write( 0, $engine->SIG_BLIST ); } if ( $self->{key_md5} ) { @@ -31,9 +28,9 @@ sub _init { sub clear { my $self = shift; - $self->engine->storage->print_at( $self->offset + $self->base_size, - chr(0) x ($self->size - $self->base_size), # Zero-fill the data - ); + + # Zero-fill the data + $self->write( $self->base_size, chr(0) x ($self->size - $self->base_size) ); } sub size { @@ -100,14 +97,14 @@ sub chopped_up { my @buckets; foreach my $idx ( 0 .. $e->max_buckets - 1 ) { - my $spot = $self->offset + $self->base_size + $idx * $self->bucket_size; - my $md5 = $e->storage->read_at( $spot, $e->hash_size ); + my $spot = $self->base_size + $idx * $self->bucket_size; + my $data = $self->read( $spot, $self->bucket_size ); - #XXX If we're chopping, why would we ever have the blank_md5? - last if $md5 eq $e->blank_md5; + # _dump_file() will run into the blank_md5. Otherwise, we should never run into it. + # -RobK, 2008-06-18 + last if substr( $data, 0, $e->hash_size ) eq $e->blank_md5; - my $rest = $e->storage->read_at( undef, $self->bucket_size - $e->hash_size ); - push @buckets, [ $spot, $md5 . $rest ]; + push @buckets, [ $spot, $data ]; } return @buckets; @@ -120,8 +117,8 @@ sub write_at_next_open { #XXX This is such a hack! $self->{_next_open} = 0 unless exists $self->{_next_open}; - my $spot = $self->offset + $self->base_size + $self->{_next_open}++ * $self->bucket_size; - $self->engine->storage->print_at( $spot, $entry ); + my $spot = $self->base_size + $self->{_next_open}++ * $self->bucket_size; + $self->write( $spot, $entry ); return $spot; } @@ -151,8 +148,8 @@ sub find_md5 { my $e = $self->engine; foreach my $idx ( 0 .. $e->max_buckets - 1 ) { - my $potential = $e->storage->read_at( - $self->offset + $self->base_size + $idx * $self->bucket_size, $e->hash_size, + my $potential = $self->read( + $self->base_size + $idx * $self->bucket_size, $e->hash_size, ); if ( $potential eq $e->blank_md5 ) { @@ -178,41 +175,34 @@ sub write_md5 { DBM::Deep->_throw_error( "write_md5: no key_md5" ) unless exists $args->{key_md5}; DBM::Deep->_throw_error( "write_md5: no value" ) unless exists $args->{value}; - my $engine = $self->engine; + my $e = $self->engine; - $args->{trans_id} = $engine->trans_id unless exists $args->{trans_id}; + $args->{trans_id} = $e->trans_id unless exists $args->{trans_id}; - my $spot = $self->offset + $self->base_size + $self->{idx} * $self->bucket_size; - $engine->add_entry( $args->{trans_id}, $spot ); + my $spot = $self->base_size + $self->{idx} * $self->bucket_size; + $e->add_entry( $args->{trans_id}, $self->offset + $spot ); unless ($self->{found}) { my $key_sector = DBM::Deep::Engine::Sector::Scalar->new({ - engine => $engine, + engine => $e, data => $args->{key}, }); - $engine->storage->print_at( $spot, - $args->{key_md5}, - pack( $engine->StP($engine->byte_size), $key_sector->offset ), - ); + $self->write( $spot, $args->{key_md5} . pack( $e->StP($e->byte_size), $key_sector->offset ) ); } - my $loc = $spot - + $engine->hash_size - + $engine->byte_size; + my $loc = $spot + $e->hash_size + $e->byte_size; if ( $args->{trans_id} ) { - $loc += $engine->byte_size + ($args->{trans_id} - 1) * ( $engine->byte_size + $DBM::Deep::Engine::STALE_SIZE ); + $loc += $e->byte_size + ($args->{trans_id} - 1) * ( $e->byte_size + $DBM::Deep::Engine::STALE_SIZE ); - $engine->storage->print_at( $loc, - pack( $engine->StP($engine->byte_size), $args->{value}->offset ), - pack( $engine->StP($DBM::Deep::Engine::STALE_SIZE), $engine->get_txn_staleness_counter( $args->{trans_id} ) ), + $self->write( $loc, + pack( $e->StP($e->byte_size), $args->{value}->offset ) + . pack( $e->StP($DBM::Deep::Engine::STALE_SIZE), $e->get_txn_staleness_counter( $args->{trans_id} ) ), ); } else { - $engine->storage->print_at( $loc, - pack( $engine->StP($engine->byte_size), $args->{value}->offset ), - ); + $self->write( $loc, pack( $e->StP($e->byte_size), $args->{value}->offset ) ); } } @@ -221,31 +211,29 @@ sub mark_deleted { my ($args) = @_; $args ||= {}; - my $engine = $self->engine; + my $e = $self->engine; - $args->{trans_id} = $engine->trans_id unless exists $args->{trans_id}; + $args->{trans_id} = $e->trans_id unless exists $args->{trans_id}; - my $spot = $self->offset + $self->base_size + $self->{idx} * $self->bucket_size; - $engine->add_entry( $args->{trans_id}, $spot ); + my $spot = $self->base_size + $self->{idx} * $self->bucket_size; + $e->add_entry( $args->{trans_id}, $self->offset + $spot ); my $loc = $spot - + $engine->hash_size - + $engine->byte_size; + + $e->hash_size + + $e->byte_size; if ( $args->{trans_id} ) { - $loc += $engine->byte_size + ($args->{trans_id} - 1) * ( $engine->byte_size + $DBM::Deep::Engine::STALE_SIZE ); + $loc += $e->byte_size + ($args->{trans_id} - 1) * ( $e->byte_size + $DBM::Deep::Engine::STALE_SIZE ); - $engine->storage->print_at( $loc, - pack( $engine->StP($engine->byte_size), 1 ), # 1 is the marker for deleted - pack( $engine->StP($DBM::Deep::Engine::STALE_SIZE), $engine->get_txn_staleness_counter( $args->{trans_id} ) ), + $self->write( $loc, + pack( $e->StP($e->byte_size), 1 ) # 1 is the marker for deleted + . pack( $e->StP($DBM::Deep::Engine::STALE_SIZE), $e->get_txn_staleness_counter( $args->{trans_id} ) ), ); } else { - $engine->storage->print_at( $loc, - pack( $engine->StP($engine->byte_size), 1 ), # 1 is the marker for deleted - ); + # 1 is the marker for deleted + $self->write( $loc, pack( $e->StP($e->byte_size), 1 ) ); } - } sub delete_md5 { @@ -261,13 +249,15 @@ sub delete_md5 { }); my $key_sector = $self->get_key_for; - my $spot = $self->offset + $self->base_size + $self->{idx} * $self->bucket_size; - $engine->storage->print_at( $spot, - $engine->storage->read_at( + my $spot = $self->base_size + $self->{idx} * $self->bucket_size; + + # Shuffle everything down to cover the deleted bucket's spot. + $self->write( $spot, + $self->read( $spot + $self->bucket_size, $self->bucket_size * ( $engine->max_buckets - $self->{idx} - 1 ), - ), - chr(0) x $self->bucket_size, + ) + . chr(0) x $self->bucket_size, ); $key_sector->free; @@ -290,7 +280,7 @@ sub get_data_location_for { my $e = $self->engine; - my $spot = $self->offset + $self->base_size + my $spot = $self->base_size + $args->{idx} * $self->bucket_size + $e->hash_size + $e->byte_size; @@ -299,11 +289,11 @@ sub get_data_location_for { $spot += $e->byte_size + ($args->{trans_id} - 1) * ( $e->byte_size + $DBM::Deep::Engine::STALE_SIZE ); } - my $buffer = $e->storage->read_at( - $spot, - $e->byte_size + $DBM::Deep::Engine::STALE_SIZE, + my $buffer = $self->read( $spot, $e->byte_size + $DBM::Deep::Engine::STALE_SIZE ); + my ($loc, $staleness) = unpack( + $e->StP($e->byte_size) . ' ' . $e->StP($DBM::Deep::Engine::STALE_SIZE), + $buffer, ); - my ($loc, $staleness) = unpack( $e->StP($e->byte_size) . ' ' . $e->StP($DBM::Deep::Engine::STALE_SIZE), $buffer ); # XXX Merge the two if-clauses below if ( $args->{trans_id} ) { @@ -351,8 +341,8 @@ sub get_key_for { DBM::Deep->_throw_error( "get_key_for(): Attempting to retrieve $idx" ); } - my $location = $self->engine->storage->read_at( - $self->offset + $self->base_size + $idx * $self->bucket_size + $self->engine->hash_size, + my $location = $self->read( + $self->base_size + $idx * $self->bucket_size + $self->engine->hash_size, $self->engine->byte_size, ); $location = unpack( $self->engine->StP($self->engine->byte_size), $location ); diff --git a/lib/DBM/Deep/Engine/Sector/Index.pm b/lib/DBM/Deep/Engine/Sector/Index.pm index e314602..e937233 100644 --- a/lib/DBM/Deep/Engine/Sector/Index.pm +++ b/lib/DBM/Deep/Engine/Sector/Index.pm @@ -1,4 +1,3 @@ -#TODO: Convert this to a string package DBM::Deep::Engine::Sector::Index; use 5.006_000; @@ -17,15 +16,14 @@ sub _init { unless ( $self->offset ) { $self->{offset} = $engine->_request_index_sector( $self->size ); - my $string = chr(0) x $self->size; - substr( $string, 0, 1, $engine->SIG_INDEX ); - $engine->storage->print_at( $self->offset, $string ); + $self->write( 0, $engine->SIG_INDEX ); } return $self; } #XXX Change here +#XXX Why? -RobK, 2008-06-18 sub size { my $self = shift; unless ( $self->{size} ) { @@ -52,7 +50,7 @@ sub free { sub _loc_for { my $self = shift; my ($idx) = @_; - return $self->offset + $self->base_size + $idx * $self->engine->byte_size; + return $self->base_size + $idx * $self->engine->byte_size; } sub get_entry { @@ -66,7 +64,7 @@ sub get_entry { return unpack( $e->StP($e->byte_size), - $e->storage->read_at( $self->_loc_for( $idx ), $e->byte_size ), + $self->read( $self->_loc_for( $idx ), $e->byte_size ), ); } @@ -79,10 +77,7 @@ sub set_entry { DBM::Deep->_throw_error( "set_entry: Out of range ($idx)" ) if $idx < 0 || $idx >= $e->hash_chars; - $self->engine->storage->print_at( - $self->_loc_for( $idx ), - pack( $e->StP($e->byte_size), $loc ), - ); + $self->write( $self->_loc_for( $idx ), pack( $e->StP($e->byte_size), $loc ) ); } 1; diff --git a/lib/DBM/Deep/Engine/Sector/Null.pm b/lib/DBM/Deep/Engine/Sector/Null.pm index c9570f5..18af99a 100644 --- a/lib/DBM/Deep/Engine/Sector/Null.pm +++ b/lib/DBM/Deep/Engine/Sector/Null.pm @@ -20,16 +20,12 @@ sub _init { unless ( $self->offset ) { $self->{offset} = $engine->_request_data_sector( $self->size ); - my $string = chr(0) x $self->size; - - substr( $string, 0, 1, $self->type ); - substr( $string, $self->base_size, $engine->byte_size + 1, + $self->write( 0, $self->type ); + $self->write( $self->base_size, pack( $engine->StP($engine->byte_size), 0 ) # Chain loc . pack( $engine->StP(1), $self->data_length ), # Data length ); - $engine->storage->print_at( $self->offset, $string ); - return; } } diff --git a/lib/DBM/Deep/Engine/Sector/Reference.pm b/lib/DBM/Deep/Engine/Sector/Reference.pm index 71a1eaf..29d33dc 100644 --- a/lib/DBM/Deep/Engine/Sector/Reference.pm +++ b/lib/DBM/Deep/Engine/Sector/Reference.pm @@ -1,4 +1,3 @@ -#TODO: Convert this to a string package DBM::Deep::Engine::Sector::Reference; use 5.006_000; @@ -31,22 +30,20 @@ sub _init { $class_offset = $class_sector->offset; } - my $string = chr(0) x $self->size; - substr( $string, 0, 1, $self->type ); - substr( $string, $self->base_size, 3 * $e->byte_size, + $self->write( 0, $self->type ); + $self->write( $self->base_size, pack( $e->StP($e->byte_size), 0 ) # Index/BList loc . pack( $e->StP($e->byte_size), $class_offset ) # Classname loc . pack( $e->StP($e->byte_size), 1 ) # Initial refcount ); - $e->storage->print_at( $self->offset, $string ); } else { - $self->{type} = $e->storage->read_at( $self->offset, 1 ); + $self->{type} = $self->read( 0, $e->SIG_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 ), + $self->read( $e->SIG_SIZE, $DBM::Deep::Engine::STALE_SIZE ), ); return; @@ -207,8 +204,10 @@ sub get_blist_loc { my $self = shift; my $e = $self->engine; - my $blist_loc = $e->storage->read_at( $self->offset + $self->base_size, $e->byte_size ); - return unpack( $e->StP($e->byte_size), $blist_loc ); + return unpack( + $e->StP($e->byte_size), + $self->read( $self->base_size, $e->byte_size ), + ); } sub get_bucket_list { @@ -231,9 +230,7 @@ sub get_bucket_list { key_md5 => $args->{key_md5}, }); - $engine->storage->print_at( $self->offset + $self->base_size, - pack( $engine->StP($engine->byte_size), $blist->offset ), - ); + $self->write( $self->base_size, pack( $engine->StP($engine->byte_size), $blist->offset ) ); return $blist; } @@ -358,9 +355,7 @@ sub get_bucket_list { $new_index->offset, ); } else { - $engine->storage->print_at( $self->offset + $self->base_size, - pack( $engine->StP($engine->byte_size), $new_index->offset ), - ); + $self->write( $self->base_size, pack( $engine->StP($engine->byte_size), $new_index->offset ) ); } $sector->clear; @@ -385,8 +380,9 @@ sub get_class_offset { my $e = $self->engine; return unpack( $e->StP($e->byte_size), - $e->storage->read_at( - $self->offset + $self->base_size + 1 * $e->byte_size, $e->byte_size, + $self->read( + $self->base_size + 1 * $e->byte_size, + $e->byte_size, ), ); } @@ -492,8 +488,9 @@ sub get_refcount { my $e = $self->engine; return unpack( $e->StP($e->byte_size), - $e->storage->read_at( - $self->offset + $self->base_size + 2 * $e->byte_size, $e->byte_size, + $self->read( + $self->base_size + 2 * $e->byte_size, + $e->byte_size, ), ); } @@ -503,8 +500,8 @@ sub write_refcount { my ($num) = @_; my $e = $self->engine; - $e->storage->print_at( - $self->offset + $self->base_size + 2 * $e->byte_size, + $self->write( + $self->base_size + 2 * $e->byte_size, pack( $e->StP($e->byte_size), $num ), ); } diff --git a/lib/DBM/Deep/Engine/Sector/Scalar.pm b/lib/DBM/Deep/Engine/Sector/Scalar.pm index d47d9f0..b4810ff 100644 --- a/lib/DBM/Deep/Engine/Sector/Scalar.pm +++ b/lib/DBM/Deep/Engine/Sector/Scalar.pm @@ -36,8 +36,6 @@ sub _init { my $data_section = $self->size - $self->base_size - $engine->byte_size - 1; - - my $curr_offset = $self->offset; my $continue = 1; while ( $continue ) { @@ -62,7 +60,7 @@ sub _init { } my $string = chr(0) x $self->size; - substr( $string, 0, 1, $self->type ); + substr( $string, 0, $engine->SIG_SIZE, $self->type ); substr( $string, $self->base_size, $engine->byte_size + 1, pack( $engine->StP($engine->byte_size), $next_offset ) # Chain loc . pack( $engine->StP(1), $this_len ), # Data length diff --git a/lib/DBM/Deep/File.pm b/lib/DBM/Deep/File.pm index 7974ef4..b4ae51d 100644 --- a/lib/DBM/Deep/File.pm +++ b/lib/DBM/Deep/File.pm @@ -239,9 +239,13 @@ sub unlock { if ($self->{locking} && $self->{locked} > 0) { $self->{locked}--; - if (!$self->{locked}) { flock($self->{fh}, LOCK_UN); } - return 1; + if (!$self->{locked}) { + flock($self->{fh}, LOCK_UN); + return 1; + } + + return; } return; diff --git a/lib/DBM/Deep/Hash.pm b/lib/DBM/Deep/Hash.pm index cc84b64..e1d09d3 100644 --- a/lib/DBM/Deep/Hash.pm +++ b/lib/DBM/Deep/Hash.pm @@ -72,6 +72,8 @@ sub FIRSTKEY { ## my $self = shift->_get_self; + warn "HASH:FIRSTKEY($self)\n" if DBM::Deep::DEBUG; + $self->lock_shared; my $result = $self->_engine->get_next_key( $self ); @@ -93,12 +95,14 @@ sub NEXTKEY { ? $self->_engine->storage->{filter_store_key}->($_[0]) : $_[0]; + warn "HASH:NEXTKEY($self,$prev_key)\n" if DBM::Deep::DEBUG; + $self->lock_shared; my $result = $self->_engine->get_next_key( $self, $prev_key ); $self->unlock(); - + return ($result && $self->_engine->storage->{filter_fetch_key}) ? $self->_engine->storage->{filter_fetch_key}->($result) : $result; diff --git a/t/01_basic.t b/t/01_basic.t index 5798da4..4b9208e 100644 --- a/t/01_basic.t +++ b/t/01_basic.t @@ -2,7 +2,7 @@ # DBM::Deep Test ## use strict; -use Test::More tests => 3; +use Test::More tests => 4; use t::common qw( new_fh ); @@ -27,3 +27,4 @@ isa_ok( $db, 'DBM::Deep' ); ok(1, "We can successfully open a file!" ); $db->{foo} = 'bar'; +is( $db->{foo}, 'bar' ); diff --git a/t/02_hash.t b/t/02_hash.t index 6e9972a..4ad5d92 100644 --- a/t/02_hash.t +++ b/t/02_hash.t @@ -45,6 +45,7 @@ is( $db->{key4}, undef, "Autovivified key4" ); ok( exists $db->{key4}, "Autovivified key4 now exists" ); delete $db->{key4}; + ok( !exists $db->{key4}, "And key4 doesn't exists anymore" ); # Keys will be done via an iterator that keeps a breadcrumb trail of the last diff --git a/t/97_dump_file.t b/t/97_dump_file.t index 1445517..fec9980 100644 --- a/t/97_dump_file.t +++ b/t/97_dump_file.t @@ -11,6 +11,7 @@ my $db = DBM::Deep->new( ); is( $db->_dump_file, <<"__END_DUMP__", "Dump of initial file correct" ); +Size: 94 NumTxns: 1 Chains(B): Chains(D): @@ -21,6 +22,7 @@ __END_DUMP__ $db->{foo} = 'bar'; is( $db->_dump_file, <<"__END_DUMP__", "Dump of initial file correct" ); +Size: 609 NumTxns: 1 Chains(B): Chains(D):