in reply to Suggestions for design of a config/rules file

You're going to get a lot of comments suggesting a couple of different possibilities, and modules to match: XML and Dumper/eval.

There are many modules to play with XML, so I won't recommend any particular one. But I don't recommend parsing XML with your own regexes. Use the code that's already been debugged.

If security's not an issue and the data is not that big, like ~/.foobarrc files, I would go with Data::Dumper and eval. It's quick, it's easy, it's extensible without effort.

--
[ e d @ h a l l e y . c c ]

  • Comment on Re: Suggestions for design of a config/rules file

Replies are listed 'Best First'.
Re^2: Suggestions for design of a config/rules file
by Plankton (Vicar) on Jun 09, 2004 at 18:00 UTC
      By eval, I mean any of the class of Perl routines which ultimately do an eval anyway. Both require FILE and do FILE ultimately do an evaluation of the file contents. The rest is syntactic sugar.

      --
      [ e d @ h a l l e y . c c ]