DBM-Deep
view release on metacpan or search on metacpan
utils/lib/DBM/Deep/10002.pm view on Meta::CPAN
}
sub add_entry {
my $self = shift;
my ($trans_id, $loc) = @_;
$self->{entries}{$trans_id} ||= {};
$self->{entries}{$trans_id}{$loc} = undef;
}
# If the buckets are being relocated because of a reindexing, the entries
# mechanism needs to be made aware of it.
sub reindex_entry {
my $self = shift;
my ($old_loc, $new_loc) = @_;
TRANS:
while ( my ($trans_id, $locs) = each %{ $self->{entries} } ) {
foreach my $orig_loc ( keys %{ $locs } ) {
if ( $orig_loc == $old_loc ) {
delete $locs->{orig_loc};
( run in 1.139 second using v1.01-cache-2.11-cpan-71847e10f99 )