Opcode
Permits defining an operator mask
(opmask) so that any code containing a masked opcode will not compile
or execute when Perl next compiles any code. Not usually used
directly; for examples of Opcode’s use, see the ops
pragma and the Safe module.
Valid opcodes are listed in the array op_name
in the file
opcode.h. Many Opcode functions and methods take
lists of operators, which are composed of elements. Each element can
be a:
name
(opname
) ornegated name
Name of operator, usually lowercase. Prefixing the name with an exclamation mark (
!
) removes it from the accumulated set of operations.set
(opset
)Operator set. Binary string holding a set of zero or more operators.
tag name
(optag
) ornegated tag
Operator tag name; refers to groups (or sets) of operators. Begins with a colon (
:
). Negated by prefixing with an exclamation mark (!
). Severaloptag
s are predefined, including the following. See the Opcode module’s manpage for the opcodes included in each tag.:base_core :base_io :base_loop :base_math :base_mem :base_orig :browse :dangerous :default :filesys_open :filesys_read :filesys_write :others :ownprocess :still_to_be_decided :subprocess :sys_db
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.