I did some 'research' into this about a year ago with the same goal. The conclusion I came to was that for mere mortals like me, there was no way to *really* secure perl without turning it into an language as braindead as javascript.
In my case I wanted a database backend that people could run small routines against (to make some kind of extendable web community). I thought I could use the Tie::modules but it turns out using any kind of module opens the flood gates.
A suprising number of reasonable commands rely on the same opcodes that 'dangerous' commands rely on. I don't know the design of Perl5 but I've been checking out Perl6 and the Parrot interpretor looks like it's going to have the same problems. While security is best done at the OS level Perl seems to go out of it's way to be hard to secure.
An easier solution is to use the Inline:: series of modules to allow users to program in Basic, Java, C, CPP, Befunge, BrainF**k or whatever. These language lack the power of perl, but they also lack the security dangers.
____________________
Jeremy
I didn't believe in evil until I dated it.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.