mrjt Messages: 705 Registered: March 2007 Location: London
Contributor
alendar wrote on Wed, 27 January 2010 01:24
I take the documentation comments to heart, by the way. In "About storing configuration" the writer says "...registry functions (we don't like them very much, honestly)...". So I don't use them. The LoadIniFile seems like a nice option, and the least likely to break after enhancements. I am leaning towards the last one listed, RegisterGlobalConfig. I know many parts of my code will want to update their configuration without funneling everything through some central list. We'll see. It looks straight-forward, but I think upgrades will trash the previous configurations unless I come up with a way to maintain versions of the serialized class. I'll experiment; maybe its more sturdy than I think.
This is an issue with Serialization. One solution is to write a version number at the beginning and then branch off it when reading. See Splitter::Serialize for an example of this.