in reply to Re^4: Memoize::Expire oddity
in thread Memoize::Expire oddity

Thanks for this example. With a little further modification it demonstrates that Memoize::Expire won't work for functions returning lists
Right, which is why when I needed such abilities I wrote my own expiring backend to Memoize. If you want to do the same, start with the INTERFACE section of the Memoize::Expire POD.

For the record, I also had to implement FIRSTKEY and NEXTKEY methods for things to work correctly.

Cheers.

Replies are listed 'Best First'.
Re^6: Memoize::Expire oddity
by Yary (Pilgrim) on Aug 30, 2013 at 00:00 UTC
    Ah, well... my little example above lets you use any existing tied hash with Memoize in list context, and I'm using it successfully with real code backed by Memoize::Expire in once case and and AnyDBM_File in another. Just a few lines, nothing reimplemented!