use base qw( DBM::Deep::Engine::Sector::Data );
+my $STALE_SIZE = 2;
+
+# Please refer to the pack() documentation for further information
+my %StP = (
+ 1 => 'C', # Unsigned char value (no order needed as it's just one byte)
+ 2 => 'n', # Unsigned short in "network" (big-endian) order
+ 4 => 'N', # Unsigned long in "network" (big-endian) order
+ 8 => 'Q', # Usigned quad (no order specified, presumably machine-dependent)
+);
+
sub _init {
my $self = shift;
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;