in reply to Reference as a hash key

Each reference is unique, so it's a valid key. I don't know any reason why your solution shouldn't work, I also did something like this some time ago and it worked. I can't see any reason why you shouldn't use a ref as a key, but always remember that tie'ing the whole thing won't work.