[Chapter 8] 8.117 Opcode
Author: Ellen Siever, Stephen Spainhour & Nathan Patwardhan
Date: 1999-07-02T01:50:23Z

#

| Chapter 8 Standard Modules |

## 8.117 Opcode

Permits defining an operator mask 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`) or `negated 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`) or `negated tag`

  Operator tag name; refers to groups (or sets) of operators. Begins with a colon (`:`). Negated by prefixing with an exclamation mark (`!`). Several optags are predefined, including the following. See the manpage for the Opcode module 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

### 8.117.1 Functions

All the following functions can be exported:

- define_optag
- empty_opset
- full_opset
- invert_opset
- opcodes
- opdesc
- opdump
- opmask
- opmask_add
- opset
- opset_to_hex
- opset_to_ops
- verify_opset

8.116 ODBM_File |  | 8.118 ops