From: Charles Hixson Date: 2003-11-14T12:36:51+09:00 Subject: Singletons and Marshalling Does anyone know how singleton's and marshalling interact? In particular, I want to have my singleton class be able to dump and load (and be saved on a file). So I'm wondering if there are any methods to be implemented that would enable this. In particular, I'm composing a kind of container class that will contain either an array, a hash, or possibly both of values. Dumping it should be basically dumping all the members of the hash/array (plus a few more), and restoring should append the contents of the being-restored value to the one in memory. (Duplicates aren't a problem as they'll just be dropped.) If this can't be done, there are other approaches, but as they involve things like private class variables & classes that are only used internally as a cache.... well, the other approach looks cleaner, if it's possible.