|Think about Loose Coupling|
A perl sandbox?by nashdj (Friar)
|on Apr 25, 2001 at 05:45 UTC||Need Help??|
nashdj has asked for the wisdom of the Perl Monks concerning the following question:
I have been thinking about this issue for a very very long time.
What I need is some kind of perl sandbox. I have an irc bot (ta NET::IRC) that I run in a channel with friends. Certain commands that fetch data over the internet or let me view information from my server can only be executed by me. Which is fine, but a while ago I implemented an eval command. Which allows for a *lot* of fun from an irc terminal.
Basically eval $eval = "blah"; Will have the bot send back "blah". Now this command is fine, as-long-as I'm the only one who can execute it. There is certainly more than one way to do bad stuff to a system :)
So there is no problem if I prevent everyone else from using this command, which is simple. But given that most of my friends are now interested in learning perl, and would just love to try out their own one-liners while on irc, I would really like a safe way to allow its use.
The conclusions I have reached:
Given that only perl can parse perl