Is there a generic module or design concept available that I can reuse.

I wrote Tree::Parser for reasons very similar to yours. I needed to allow people to model tree-ish structures within Excel and then export them as tab-delimited files which I could parse and use. Tree::Parser is pretty flexible in terms of allowing you to build heirarchies of tree objects (the trees are Tree::Simple objects, a module I also wrote) from a variety of input styles, not just tab-delimited and even allows you to write your own custom input processors if need be. The Tree::Simple objects it produces can hold arbitrary data in their nodes as well, so there is little restriction as to the make-up of the resulting tree. Tree::Parser also supports deparsing, so its possible to easily serialize any programmatic changes back to your original files.

Let me know if you are interested in using/trying it out, and I will be happy to answer any questions you might have.

-stvn

In reply to Re: Suggestions for design of a config/rules file by stvn
in thread Suggestions for design of a config/rules file by thens

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.