You might want to look at the Safe module, paying particular attention to the reval method:
reval (STRING)
This evaluates STRING as perl code inside the compartment.
The code can only see the compartment's namespace (as returned by the root method). The compartment's root package appears to be the main:: package to the code inside the compartment.
Update: I just saw sgifford's reply tucked away there, saying the same thing. :)
In reply to Re: limiting scope of 'eval'??
by edan
in thread limiting scope of 'eval'??
by ManFromNeptune
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |