Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • by djberg96 (2603) on 2008.07.22 9:00 (#63996) Journal
    Couldn't you add callback support to MJD's Memoize module? Add two options, CALLBACK_ON_LOAD and CALLBACK_IF_CACHED, or something:

    memoize('function', CALLBACK_ON_LOAD => sub{ My::Fixtures::Users->load });

    This gives me an idea for the Ruby memoize library, actually...

    • I don't want to necessarily memoize these functions, so hooking into that doesn't seem right (though to be fair, it didn't occur to me, either).