On Thu, Jun 27, 2013 at 8:26 PM, Gaal Yahas wrote:

> Wouldn't putting the call to memoize in a BEGIN block do the trick?
>

Ah, it will. But I want to expose the ability of tying the cache to a
permanent storage (such as DB_File)  in production or not to, in testing
mode.

Which brings me to a new question: I connect the memorized function to a
hashref that points to a tied hash that is tied to DB_File.
Can I tie the hash afterwards? I think that I can.
This will solve my memorize problem (that I already solved using one more
function call) and will let me init the the permanent storage on run time.
I like it.

Shmuel.
_______________________________________________
Perl mailing list
Perl@perl.org.il
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to