In a fairly big legacy project, I've refactored several hairy modules into Moose classes. Each of these modules requires database access to (lazy) fetch its attributes. Since those objects are used pretty heavily, I want to reduce the number of redundant requests, for example for unchanged data.
Now, how do I do that properly? I've got ...
What exactly are the weak references that KiokuDB tutorial mentions?
How do they differ from 'normal' references?
...
I would like to make sure I get KiokuDB's scope concept correctly.
Suppose I would like to load an object from db1 and store it in db2. Must I have both scopes 'open' at the same time?
...
I use KiokuDB to store a couple of Moose objects and a couple of simple array structures (hashes and arrays).
I do not need any fancy searches, transactions etc., simple the ability to fetch (lookup) an object. Also, as soon as I'm done creating the DB, it can be set read-only. No changes will ever be made to it.
The main (only?) reaso...
I have a few Moose objects and some other simple hash objects (hashes, arrays) I'd like to serialize.
At first, I used a simple
my $obj_store_file = nstore($obj);
and
my $obj = retrieve($obj_store_file);
This worked well.
Later, I found about MooseX::Storage and KiokuDB. I tried using them to enjoy some benefits they have, but:
...