Safe(3p) Perl Programmers Reference Guide Safe(3p)
Safe(3p) Perl Programmers Reference Guide Safe(3p) # Safe(3p) Perl Programmers Reference Guide Safe(3p) NNAAMMEE # Safe - Compile and execute code in restricted compartments SSYYNNOOPPSSIISS # use Safe; $compartment = new Safe; $compartment->permit(qw(time sort :browse)); $result = $compartment->reval($unsafe_code); DDEESSCCRRIIPPTTIIOONN # The Safe extension module allows the creation of compartments in which perl code can be evaluated. Each compartment has a new namespace The "root" of the namespace (i.e. "main::") is changed to a different package and code evaluated in the compartment cannot refer to variables outside this namespace, even with run-time glob lookups and other tricks. ...