Possibly time to step in here and suggest XML rather than creating some 
new or using some pre-existing config file standard. I am not an XML 
zealot, in fact I have been rather resistant to it for a while, but this 
sounds like opportunity knocking for it.

That way "coming up with parsing algorithm" is not necessary and whoever 
maintains the code in 2 years won't have to ask about it....


Jeff 'japhy' Pinyan wrote:
> On Jul 16, Kevin Old said:
> 
> 
>>Do you have any code for processing a config file and/or an example
>>config file?
> 
> 
> There are plenty of config-file modules on CPAN.  Search for "config" at
> http://search.cpan.org/.
> 
> 
>>%mar_omc_and_mms = (
>> 'clt' => { 'omc2' => [qw(mm3 mm4)] },
>> 'clt1x' => { 'omc1' => [qw(mm101 mm102)],
>>              'omc3' => [qw(mm5 mm6 mm7)] },
>> 'gvl' => { 'omc1' => [qw(mm1 mm2)],
>>            'omc2' => [qw(mm3 mm4)] },
>> 'col' => { 'omc1' => [qw(mm1 mm2)] },
>> 'rdu' => { 'omc1' => [qw(mm1 mm2)] },
>> 'gso' => { 'omc1' => [qw(mm1 mm2)] },
>> 'chs' => { 'omc1' => [qw(mm1 mm2)] }
>>)
> 
> 
> You can create config files in any format you want.  It just comes down to
> what's easiest for the END-USER to modify.
> 
> Here's one:
> 
>   clt.omc2 = mm3 mm4
>   clt1x.omc1 = mm101 mm102
>   clt1x.omc3 = mm5 mm6 mm7
>   [etc]
> 
> Here's another (a lispish fiend):
> 
>   (clt
>     (omc2 mm3 mm4)
>   )
>   (clt1x
>     (omc1 mm101 mm102)
>     (omc3 mm5 mm6 mm7)
>   )
>   [etc]
> 
> Here's yet another:
> 
>   %clt
>   omc2 = mm3 mm4
> 
>   %clt1x
>   omc1 = mm101 mm102
>   omc3 = mm5 mm6 mm7
> 
>   [etc]
> 
> Just pick one you like, and come up with a parsing algorithm.  The first
> and last ones are the easiest to parse in my opinion.  The second one adds
> a layer of difficulty.
> 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to