In fact, I'd like to hide from the eval'd code all variables and functions that were declared outside of it. Is this possible?
All 'my' variables can be hidden with the code below, but the others are trickier. If you can take the performance hit, use system to run the code in a seperate interpreter if you can.
# Before any 'my'. Put in a seperate module if necessary. # Use eval_it instead of eval. sub eval_it { eval shift; }
In reply to Re: limiting scope of 'eval'??
by ikegami
in thread limiting scope of 'eval'??
by ManFromNeptune
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |