From: rkinyon Date: Thu, 16 Feb 2006 19:07:18 +0000 (+0000) Subject: Updated MANIFEST X-Git-Tag: 0-97~61 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ccdfc465dd23ba3df186d082e57885a4082ed69b;p=dbsrgits%2FDBM-Deep.git Updated MANIFEST --- diff --git a/MANIFEST b/MANIFEST index af31b1c..4e7b29e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -5,26 +5,27 @@ Makefile.PL MANIFEST META.yml lib/DBM/Deep.pm -t/01basic.t -t/02hash.t -t/03bighash.t -t/04array.t -t/05bigarray.t -t/07error.t -t/08locking.t -t/09deephash.t -t/10deeparray.t -t/11largekeys.t -t/12optimize.t -t/13clone.t -t/14setpack.t -t/15filter.t -t/16digest.t -t/17circular.t -t/18import.t -t/19export.t -t/20crossref.t -t/21_tie.t -t/22_tie_access.t -t/23_stupidities.t -t/24_internal_copy.t +t/01_basic.t +t/02_hash.t +t/03_bighash.t +t/04_array.t +t/05_bigarray.t +t/06_error.t +t/07_locking.t +t/08_deephash.t +t/09_deeparray.t +t/10_largekeys.t +t/11_optimize.t +t/12_clone.t +t/13_setpack.t +t/14_filter.t +t/15_digest.t +t/16_circular.t +t/17_import.t +t/18_export.t +t/19_crossref.t +t/20_tie.t +t/21_tie_access.t +t/22_internal_copy.t +t/23_misc.t +t/24_autobless.t diff --git a/lib/DBM/Deep.pm b/lib/DBM/Deep.pm index b03464d..dfcc152 100644 --- a/lib/DBM/Deep.pm +++ b/lib/DBM/Deep.pm @@ -100,8 +100,8 @@ sub SIG_SIZE () { 1 } ## # Setup constants for users to pass to new() ## -sub TYPE_HASH () { return SIG_HASH; } -sub TYPE_ARRAY () { return SIG_ARRAY; } +*TYPE_HASH = \&SIG_HASH; +*TYPE_ARRAY = \&SIG_ARRAY; sub new { ## @@ -291,8 +291,7 @@ sub _open { # Get our type from master index signature ## my $tag = $self->_load_tag($self->base_offset); -#XXX We probably also want to store the hash algorithm name, not assume anything -#XXX Convert to set_type() when one is written +#XXX We probably also want to store the hash algorithm name and not assume anything if (!$tag) { return $self->_throw_error("Corrupted file, no master index record"); } @@ -400,8 +399,9 @@ sub _add_bucket { ## $result = 2; - if ($internal_ref) { $location = $value->base_offset; } - else { $location = $self->root->{end}; } + $location = $internal_ref + ? $value->base_offset + :$location = $self->root->{end}; seek($self->fh, $tag->{offset} + ($i * $BUCKET_SIZE), 0); $self->fh->print( $md5 . pack($LONG_PACK, $location) );