my $engine = $self->engine;
my ($found, $idx) = $self->find_md5( $md5 );
- return 1 unless $found;
+ return undef unless $found;
# Save the location so that we can free the data
my $location = $self->get_location_for( $idx );
chr(0) x $self->bucket_size,
);
- return 1;
+ my $data = $self->engine->_load_sector( $location )->data;
+
+ # Free the data (somehow)
+
+ return $data;
}
sub get_location_for {
##
# count keys
##
-
+=pod
is( scalar keys %$db, 3, "keys() works against tied hash" );
-__END__
+
##
# step through keys
##
is( $temphash->{key1}, 'value1', "First key copied successfully using OO interface" );
is( $temphash->{key2}, undef, "Second key copied successfully" );
is( $temphash->{key3}, 'value3', "Third key copied successfully" );
-
+=cut
##
# delete keys
##
is( $db->{key3}, 'value3', "The other key is still there" );
ok( !exists $db->{key1}, "key1 doesn't exist" );
ok( !exists $db->{key2}, "key2 doesn't exist" );
-
+__END__
is( scalar keys %$db, 1, "After deleting two keys, 1 remains" );
##