From: Simon W. <es...@ou...> - 2003-02-17 23:13:41
|
On Mon, 17 Feb 2003, Wizard wrote: > > > foreach( split /\,\s*/, $blocked_users ) { > > > push @bad_users, $_; > > > } > > > > Why not use a list rather than a scalar, it would be consistent with our > > other config directives and save on this step. > > $blocked_users is read externally from the configuration file, like so: > === /.conf/.nms.cfg ===================================== > Blocked_users = fr...@fr..., ch...@ch..., ox...@bi... > =========================================================== > That's what the split is for. It could've been space separated, but I > thought it would be more readable this way. 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. 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 actually plan on profiling the whole thing, over time. I don't plan on > anything more than looking for bottlenecks for the first round. Fairy nuff :) Simon. |