Nice idea. I think I want more immediacy though, otherwise there could be problems with multiple processes where one process takes forever to release the lock, and a pile of other processes hang on that. However, a combined approach using blessing into custom classes might work (modulo the problem with spooky inaction at a distance, where one has to worry about both the representation of an object (hash, array, whatever)
and whether it has overloading or not.)
Time to lobby Hugo about some things for perl 5.9...