I am writing an OO program. It being OO (or some close approximation), it deals with its data in the form of objects. These objects are 2-3 levels deep in references, and refer to each other in a mad, free-form manner which would normally not be a problem, except...
... that this data may grow to be too large for memory to hold. Not only that, but also it may, nay, will, need to be saved to disk. Thus, I need persistence of some sort. My first instinct was to use a tied hash to store all the objects and use something like DB_File. However, DB_File stringifies everything, which is unacceptable. My next thought was to use MLDBM or similar (or write my own), which might work, except I'm not sure how well it handles circular structures. I think it dumps the whole structure into each slot.
Any thoughts?