I'm looking at writing a program in Perl to allow my users to write scripts to do things to a database through a web interface. I would also like to impose my own (arbitrary) restrictions on what they can and can't do - e.g. fine grained access control. I was thinking of implementing this by writing a simple little interpreter so they could write mini-scripts for my program to execute. I've had a bit of a look around and can't find anything even close. I'd be happy even with a basic interpreter written in perl. Can anyone point me in right direction?
PS even though I say 'simple' all the way through this, I'd still like to give them acess to some powerful functions like s///. The main thing I dread is writing conditional/case statements and the like.