libtie-refhash-weak-perl

Tie::refhash subclass with weakened references in the keys
  http://search.cpan.org/dist/Tie-RefHash-Weak/
  0
  no reviews



Tie::refhash can be used to access hashes by reference. this is useful when you index by object, for example.

the problem with tie::refhash, and cross indexing, is that sometimes the index should not contain strong references to the objecs. the internal structures of tie::refhash contain strong references to the key, and provide no convenient means to make those references weak.

this subclass of tie::refhash has weak keys, instead of strong ones. the values are left unaltered, and you'll have to make sure there are no strong references there yourself.