Hello Monks,

For a personal "fun" project I've had rattling around for a long time: is there any way (or are there any existing projects) to implement a subset of Perl? More to the point, I'm thinking about an educational game for grade school kids to learn some basic programming concepts without, you know, BASIC. I don't need a super-secure hack-proof system--it's not that important. Mainly I just want to limit the students' ability to shoot themselves (and each other) in the foot, and also limit their access to cheat by taking liberties with namespaces and object innards. Off the top of my head, I'd want to eliminate or limit:

I realize I'll at the very least need a custom Perl installation, with many core modules removed, stubbed, or overridden. I imagine there are some compile flags that would help as well. Students would not have the ability to run their code directly; it would be saved in a web-based editor and run by a harness of my creation (so default pragmas, overrides, source filters, etc., can be taken care of). To limit the performance hit from the inevitable runaway loops (despite best efforts to detect and kill them), as well as provide a bit of partitioning, I'm thinking of just keeping several lightweight VMs running with finite resource limits, which would serve requests round-robin.

I'm sure I haven't thought of everything (and it certainly doesn't need to be perfect), but with any luck I'm closer to over-thinking this than under-thinking. Thoughts? Existing projects I haven't been able to find?


In reply to Subset of Perl language by wanna_code_perl

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.