From: Toby J. <pu...@to...> - 2002-12-10 17:12:43
|
I briefly mentioned before how configuration items that allow the user to enter multiple formats will cause problems when moving to a database backend. For example, BackupFilesOnly can be "a string, an array of strings, or, in the case of multiple shares, a hash of strings or arrays". I think allowing the user this flexibility for text files is a good thing, but I think the code that loads the file into memory should take care of standardizing the format. That way, not only will it be easier to simply dump all the config info into the database using ConfigDef (as I described earlier), but any code that uses these parameters can count on a consistent structure instead of figuring it out right then. So, for BackupFilesOnly (and -Exclude), how about always loading it into a hash of arrays? For the case of a single share, the hash key could be "*". So for example, $Conf{BackupFilesOnly} = '/data'; becomes $Conf{BackupFilesOnly} = { '*' => ['/data'] }; It seems like this would also simplify the CGI interface ("Enter the share name, or a single asterisk for all shares"). Any complaints? toby |