in reply to Memoize collision with objects
Yet another way of tackling this is to use the SCALAR_CACHE and LIST_CACHE options of memoize, so you have a handle on the cache used my memoize. Then define a Foo::DESTROY function where you remove the corresponding entries in the cache.