You are viewing the version of this documentation from Perl 5.39.10. This is a development version of Perl.

CONTENTS

NAME

Opcode - Disable named opcodes when compiling perl code

SYNOPSIS

use Opcode;

DESCRIPTION

Perl code is always compiled into an internal format before execution.

Evaluating perl code (e.g. via "eval" or "do 'file'") causes the code to be compiled into an internal format and then, provided there was no error in the compilation, executed. The internal format is based on many distinct opcodes.

By default no opmask is in effect and any code can be compiled.

The Opcode module allow you to define an operator mask to be in effect when perl next compiles any code. Attempting to compile code which contains a masked opcode will cause the compilation to fail with an error. The code will not be executed.

NOTE

The Opcode module is not usually used directly. See the ops pragma and Safe modules for more typical uses.

WARNING

The Opcode module does not implement an effective sandbox for evaluating untrusted code with the perl interpreter.

Bugs in the perl interpreter that could be abused to bypass Opcode restrictions are not treated as vulnerabilities. See