in reply to resurrecting objects?
This works:
Note that resurrect deletes the entry so if you want to resurrect an object again, you have to bury it again first.my %grave; sub bury { my( $object )= @_; $grave{$obj}= $object; } sub resurrect { my( $string )= @_; return delete $grave{$string}; }
Now, if you want to resurrect an object that you haven't cached beforehand, then, no, that isn't supported. For one thing, when you turn your object into a string, the string doesn't hold a reference to the object so the object will be destroyed if there isn't some reference to it elsewhere.
- tye (but my friends call me "Tye")
|
|---|