From: rkinyon Date: Tue, 2 Oct 2007 03:10:50 +0000 (+0000) Subject: Final prep for 1.0006 release X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2568ec794e4acd6f72696b0f82f047fad747d455;p=dbsrgits%2FDBM-Deep.git Final prep for 1.0006 release --- diff --git a/Build.PL b/Build.PL index 6ff3460..abcf310 100644 --- a/Build.PL +++ b/Build.PL @@ -7,9 +7,9 @@ my $build = Module::Build->new( license => 'perl', requires => { 'perl' => '5.006_000', - 'Digest::MD5' => '1.00', 'Fcntl' => '0.01', 'Scalar::Util' => '1.14', + 'Digest::MD5' => '1.00', 'FileHandle::Fmode' => '0.05', }, optional => { diff --git a/Changes b/Changes index df69cf8..22535e0 100644 --- a/Changes +++ b/Changes @@ -1,12 +1,14 @@ Revision history for DBM::Deep. -1.0006 Oct 01 11:15:00 2007 EDT +1.0006 Oct 01 23:15:00 2007 EDT - (This version is compatible with 1.0005) - Removed Clone and replaced it with a hand-written datastructure walker. - - This heavily reduces the footprint of a large import + - This greatly reduces the footprint of a large import + - This bypasses a failure of Clone under Perl 5.9.5 - Moved t/37_delete_edge_cases.t to t_attic because it wasn't really used - import() has a stricter API now. This is a potentially incompatible API - change. + change. Only HASH and ARRAY refs are now allowed and they must match the type + of the object being imported into. 1.0005 Oct 01 11:15:00 2007 EDT - (This version is compatible with 1.0004) diff --git a/lib/DBM/Deep.pod b/lib/DBM/Deep.pod index 823ed75..8100fec 100644 --- a/lib/DBM/Deep.pod +++ b/lib/DBM/Deep.pod @@ -1037,12 +1037,12 @@ B report on this distribution's test suite. ------------------------------------------ ------ ------ ------ ------ ------ File stmt bran cond sub total ------------------------------------------ ------ ------ ------ ------ ------ - blib/lib/DBM/Deep.pm 96.9 88.3 90.5 100.0 95.7 + blib/lib/DBM/Deep.pm 97.2 90.9 83.3 100.0 95.4 blib/lib/DBM/Deep/Array.pm 100.0 95.7 100.0 100.0 99.0 - blib/lib/DBM/Deep/Engine.pm 95.5 84.7 81.6 98.4 92.4 + blib/lib/DBM/Deep/Engine.pm 95.6 84.7 81.6 98.4 92.5 blib/lib/DBM/Deep/File.pm 97.2 81.6 66.7 100.0 91.9 blib/lib/DBM/Deep/Hash.pm 100.0 100.0 100.0 100.0 100.0 - Total 96.7 87.0 83.3 99.2 94.1 + Total 96.7 87.5 82.2 99.2 94.1 ------------------------------------------ ------ ------ ------ ------ ------ =head1 MORE INFORMATION diff --git a/lib/DBM/Deep/Engine.pm b/lib/DBM/Deep/Engine.pm index ac67de8..1a841f8 100644 --- a/lib/DBM/Deep/Engine.pm +++ b/lib/DBM/Deep/Engine.pm @@ -1720,7 +1720,8 @@ sub free { } # Rebless the object into DBM::Deep::Null. - %{ $self->engine->cache->{ $self->offset } } = (); + eval { %{ $self->engine->cache->{ $self->offset } } = (); }; + eval { @{ $self->engine->cache->{ $self->offset } } = (); }; bless $self->engine->cache->{ $self->offset }, 'DBM::Deep::Null'; delete $self->engine->cache->{ $self->offset }; diff --git a/t/17_import.t b/t/17_import.t index 42137a8..c5e034e 100644 --- a/t/17_import.t +++ b/t/17_import.t @@ -93,9 +93,6 @@ foreach my $type ( DBM::Deep->TYPE_HASH, DBM::Deep->TYPE_ARRAY ) { } { - diag "\nThere seems to be a bug in Clone on Perl 5.9+ that is causing\nthese tests to fail." - if $] >= 5.009; - my ($fh, $filename) = new_fh(); my $db = DBM::Deep->new({ file => $filename, diff --git a/t/44_upgrade_db.t b/t/44_upgrade_db.t index d2d6274..f72ef70 100644 --- a/t/44_upgrade_db.t +++ b/t/44_upgrade_db.t @@ -84,6 +84,15 @@ foreach my $input_filename ( "-version $v", ); + # Clone was removed as a requirement in 1.0006 + if ( $output =~ /Can\'t locate Clone\.pm in \@INC/ ) { + ok( 1 ); + unless ( $input_filename =~ /_/ || $v =~ /_/ ) { + ok( 1 ); ok( 1 ); + } + next; + } + if ( $input_filename =~ /_/ ) { is( $output, "'$input_filename' is a dev release and not supported.\n$short", diff --git a/utils/upgrade_db.pl b/utils/upgrade_db.pl index e7f4178..b80889b 100755 --- a/utils/upgrade_db.pl +++ b/utils/upgrade_db.pl @@ -58,6 +58,9 @@ my %db; my $mod = $headerver_to_module{ $ver }; eval "use $mod;"; + if ( $@ ) { + _exit( "Cannot load '$mod' to read header version '$ver':\n\t$@" ); + } $db{input} = $mod->new({ file => $opts{input}, locking => 1, @@ -93,6 +96,9 @@ my %db; my $mod = $headerver_to_module{ $ver }; eval "use $mod;"; + if ( $@ ) { + _exit( "Cannot load '$mod' to read header version '$ver':\n\t$@" ); + } $db{output} = $mod->new({ file => $opts{output}, locking => 1,