The question \"How can I monkey-patch an instance method in Perl?\" got me thinking. Can I dynamically redefine Perl methods? Say I have a class like this one:
I've never tried it with methods, but Memoize may be what you're looking for. But be sure to read the caveats.