From: Simon W. <es...@ou...> - 2003-02-18 07:21:10
|
On Mon, 17 Feb 2003, Wizard wrote: > > May I suggest that you create a read_config routine that handles all of > > this data munging on start up. Possibly populating a hash with an array > > ref as value and blocked_users as the key. > > You could, but we're using a generic configuration mechanism > (cfg->get(key)), so I don't think it's practical. We're not using a lot of > arrays and they'll be mixed with strings with commas, so I don't want to > make it look for specific variable names to determine storage type. There > will also be user-defined configuration variables, so adding this level of > complexity could be dangerous. OK, that seems to do much the same thing. It just seemed to make sense to do all the config variable procesing in one place but... > > This way, the processing code need only deal with the actual data which > > makes any future updates to the config syntax simple to apply. No > > scrabbling around in the code. > > I don't see that a simple split into an array is going to confuse anyone. > When it's complete, take a look. If you think there is a better way, then > please let me know. ...I'll wait to see the finished code. I'm curious about these user defined variables and how they will be used. I'll wait to read the code/docs and comment further then. Simon.` |