From: Wizard <wi...@ne...> - 2003-02-18 00:25:56
|
> 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. > 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. Grant M. |