Don't do it. Keep a loadable Perl module and keep the coding in baby Perl, and there will be few problems.

I once tried, foolishly, to do exactly what you said for writing an automatic test system. It even had while loops and for loops! I spent over half my time writing the parsing system (it ended up being rather cool), but guess what? Everyone was still afraid of the meta-language I invented, and when I had to write test cases, I missed the ability to use real Perl. Might as well just left everything in Perl and it would have been tons easier to maintain.

My other mistake was farming out some of the development to an intern, who tried to add OO-style functions to everything, and he really didn't grasp nested data structures. Between that and the ugly meta-language code he wrote, it was a total mess. And because it wasn't all Perl, it was hard for me to remember how to refactor that meta language code he wrote and clean it up.

My advice is to keep things simple, provide a lot of well documented utility functions, and do this in baby-Perl. Baby-perl is just as readable as shell script, if not more so. The implementation of the the utility functions themselves can be as Perlish as you like. Non-Perl programs may need a scripting language, but Perl already has great use at doing that.

Off-topic: anyone have experience embedding Lua in C programs? Did you like the results?


In reply to Re: Perl Script Engine by flyingmoose
in thread Perl Script Engine by davebarter

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.