I'm dealing with a situation where I'm passed a blessed
object in a function call. I store a weakened reference to
that object, since I don't want to extend its lifespan.
Is there some way I can be notified when that
object is destroyed? The best I've come up with is
restricting the function to only take blessed hashes.
I insert a second blessed object into the first object's
hash table, then stick the code-to-call-on-destruction
into the second object's DESTROY function. Is there
anything I could do that would be more general?