my $self = shift;
my ($args) = @_;
- # XXX What should happen if this fails?
+ # This can return nothing if we are deleting an entry in a hashref that was
+ # auto-vivified as part of the delete process. For example:
+ # my $x = {};
+ # delete $x->{foo}{bar};
my $blist = $self->get_bucket_list({
key_md5 => $args->{key_md5},
- }) or DBM::Deep->_throw_error( "How did delete_key fail (no blist)?!" );
+ }) or return;
# Save the location so that we can free the data
my $location = $blist->get_data_location_for({
$sector->find_md5( $args->{key_md5} );
# See whether or not we need to reindex the bucketlist
- # Yes, the double-braces are there for a reason. if() doesn't create a redo-able block,
- # so we have to create a bare block within the if() for redo-purposes. Patch and idea
- # submitted by sprout@cpan.org. -RobK, 2008-01-09
+ # Yes, the double-braces are there for a reason. if() doesn't create a
+ # redo-able block, so we have to create a bare block within the if() for
+ # redo-purposes.
+ # Patch and idea submitted by sprout@cpan.org. -RobK, 2008-01-09
if ( !$sector->has_md5 && $args->{create} && $sector->{idx} == -1 ) {{
my $redo;