8.167. OpcodePermits 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:
8.167.1. FunctionsAll the following functions can be exported.
define_optag (optag, opset) Defines optag as symbolic name for the set opset.
empty_opset Returns an empty opset.
full_opset Returns an opset that includes all operators.
invert_opset (opset) Returns an opset that is the inverse of opset.
opcodes In scalar context, returns the number of opcodes in this version of Perl.
opdesc (op, ...) Takes list of operator names and returns the corresponding list descriptions.
opdump ([pat]) Writes two-column list of operator names and descriptions to STDOUT. If pat is specified, only lines matching the (case-insensitive) pattern are output.
opmask Returns an opset corresponding to the current opmask.
opmask_add (opset) Adds opset to the current opmask.
opset (op, ...) Returns an opset containing the listed operators.
opset_to_hex (opset) Returns string representation of opset.
opset_to_ops (opset) Returns list of operator names corresponding to the operators in the set opset.
verify_opset (opset[, ...]) Returns true if opset appears to be a valid opset, else returns false. croak s instead of returning false if optional second parameter is true. Copyright © 2002 O'Reilly & Associates. All rights reserved. |
|