in reply to Objects as hash keys?
You can, but it may or may not do what you think it's going to do. ...unless your expectations are in line with the documentation, of course.
Putting an object reference in place as a hash key causes the reference to be stringified. Each instance of an object has a unique reference, so the stringification is unique. However, you cannot take a stringified reference and turn it back into a real reference. So if that is your intention, you're outta luck.
However, it turns out that stringifying an object reference happens to be a convenient way of forming an internal object handle for inside out objects.
Dave
|
|---|