in reply to Storing object references internally
This is not a problem. The $objects{$self} is not a reference to the $Foo object. If you try to store a reference as a key in a hash, the key value will be converted into a string.
See Programming Perl 8.5.1 for an explanation.