I'm perplexed to understand what you are hoping to achieve here.

First you say:

Lamentably, another team had already written a truly horrible Windows .BAT script to do just this. Since I find it intolerable to maintain code in a language lacking subroutines, local variables, and data structures, I naturally started by re-writing it in Perl.

Great! You're going to replace the severely limited batch language with the power of a proper programming language.

But then, you decide:

To allow my script to be used by other teams, and by non-programmers, I need to make it easier to specify different action tables without touching the code.

And so opt to make your script data driven; with the result that:

Another concern is that when you have thousands of actions, or thousands of tests, a lot of repetition creeps into the data files. Now dealing with repetition (DRY) in a programming language is trivial -- just use a function or a variable, say -- but what is the best way of dealing with unwanted repetition in XML, JSON and YAML data files?

And so you come full circle and ended up with mechanism that has less flexibility, power and control than the batch script you started with. The link you provided lists AWK & sed as the other examples of data-driven programming; and Perl was designed to replace them.

And to what end?

I find the idea that non-programmers are going to be designing/configuring builds and tests of production application software totally untenable; akin to asking a non-musician to conduct the orchestra rehearsals.

Seems to me that you've lost sight of what your trying to achieve and been deceived by a new buzzword for an old idea.

Even the data formats you've suggested are a) overkill; b) require a programmer's understanding of the format to use. You mentioned liking "table-driven", so why are you looking at hierarchal data formats instead of a simple table of CSV data?

My take would be to step back. Look at a few examples of actual use cases and look for the simplest solution to solving those use cases; rather than trying to invent something that is all things to all possibilities.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

In reply to Re: Data-driven Programming: fun with Perl, JSON, YAML, XML... by BrowserUk
in thread Data-driven Programming: fun with Perl, JSON, YAML, XML... by eyepopslikeamosquito

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.