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.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


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

Reply via email to