From: rkinyon Date: Fri, 3 Mar 2006 02:15:59 +0000 (+0000) Subject: Removed [base] as no longer needed X-Git-Tag: 0-99_01~83 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=69c949803c6f2cc07ba31a687b860dd9d899ff3f;p=dbsrgits%2FDBM-Deep.git Removed [base] as no longer needed --- diff --git a/lib/DBM/Deep.pm b/lib/DBM/Deep.pm index f408d72..c6a9c4a 100644 --- a/lib/DBM/Deep.pm +++ b/lib/DBM/Deep.pm @@ -1512,15 +1512,10 @@ Here is an example: print $db->{foo} . "\n"; # prints "foo" print $db->{circle}->{foo} . "\n"; # prints "foo" again -One catch is, passing the object to a function that recursively walks the +B: Passing the object to a function that recursively walks the object tree (such as I or even the built-in C or -C methods) will result in an infinite loop. The other catch is, -if you fetch the I of a circular reference (i.e. using the C -or C methods), you will get the I, not the -ref's key. This gets even more interesting with the above example, where -the I key points to the base DB object, which technically doesn't -have a key. So I made DBM::Deep return "[base]" as the key name in that -special case. +C methods) will result in an infinite loop. This will be fixed in +a future release. =head1 CAVEATS / ISSUES / BUGS diff --git a/lib/DBM/Deep/Engine.pm b/lib/DBM/Deep/Engine.pm index 0740c2b..fccd820 100644 --- a/lib/DBM/Deep/Engine.pm +++ b/lib/DBM/Deep/Engine.pm @@ -159,12 +159,6 @@ sub open { $self->create_tag($obj, $obj->_base_offset, $obj->_type, chr(0) x $self->{index_size}); - # Why is this being printed here? I'm not seeing where anything actually points to - # this spot. - #XXX $obj->_root->{end} isn't updated from these 10 bytes that are being written - my $plain_key = "[base]"; - print( $fh pack($self->{data_pack}, length($plain_key)) . $plain_key ); - # Flush the filehandle my $old_fh = select $fh; my $old_af = $|; $| = 1; $| = $old_af;