Hi Loops,

Firstly thank you for your reply.

Your alternative solution is brilliant and is an option I will highly consider when I get round porting to a more practical format. I didn't know such a configuration parser existed.

As briefly mentioned in my question, there will be complexities in doing this, and is out of scope of the task I have been assigned.

Some of the reasons behind this are:

- This was assigned as a quickfix task, which can be revisted when there is more time in a few months. The more I have to change, the more time in development and testing.
- There are multiple configuration files containing unrelated data but are all parsed via the same parser. I do not have permission to update these configuration files just yet. Although implementing two parsers might be an option.
- The particular configuration file I am dealing with contains unrelated data, notably Log::Log4Perl configuration data which as far as I am aware must be in their documented format (selector based). Mixing formats might pose an issue. Although looking at the documentation it looks as though you can init with a ref which could be derived from the configuration file.
- The same parser is used to process application/x-www-form-urlencoded multidimensional http parameters, the task includes implementing automatic array indexing of these too whilst retaining their existing explicit array indexing usage. Therefore either way I'll have to perfect the above approach.
etc

Lastly, I haven't got around to properly going through the production code that handles this stuff just yet, the demo was just something I devised in my own time whilst fresh in my head. I certainly hope the todos I marked have already been implemented!

Chris


In reply to Re^2: Dive data with automatic array indexing by peterp
in thread Dive data with automatic array indexing by peterp

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.