Slightly Longer Definition

Provides a way to limit the abilities of code executed via an eval or do. This is done by:

  1. Putting the code in a separate namespace where it can only access variables and subroutines that are local to it or shared with it. This is done by changing the root namespace (normally, main::) to a different package for the execution of the code. This means that filehandles, variables, functions, and packages external to the code are not accessable. However, the code still thinks its root namespace is main::.

  2. Controlling the Perl operators that the code is allowed to use. The control occurs during compilation of the evaluated code into the internal format. Note that operators in this sense refer to every built-in operation possible with Perl, including functions.