NAME

Devel::MAT::Tool::Find - list SVs matching given criteria

DESCRIPTION

This Devel::MAT tool provides a command to search for SVs matching given criteria.

COMMANDS

find

pmat> find io
IO()=IO::File at 0x55a7e4d88760: ifileno=1 ofileno=1
...

Prints a list of all the SVs that match the given filter criteria.

Takes the following named options:

--count, -C

Just count the matching SVs and print the total

FILTERS

num

pmat> find num
SCALAR(UV) at 0x555555a1e9c0: 5
SCALAR(UV) at 0x555555c4f1b0: 2
SCALAR(UV) at 0x555555aa0dc0: 18446744073709551615

Prints a list of all the scalar SVs that have a numerical value, optionally filtering for only an exact value.

Takes the following named options:

--nv, --iv, --uv

Find only numerical SVs of the given types. If no options present, any numerical SV will be found.

pv

pmat> find pv "boot"
SCALAR(PV) at 0x556e4737d968: "boot_Devel::MAT::Dumper"
SCALAR(PV) at 0x556e4733a160: "boot_Cwd"
...

Prints a list of all the scalar SVs that have a PV (string value) matching the supplied pattern. Normally, the pattern is interpreted as a substring match, but the --eq and --regexp options can alter this.

Takes the following named options:

--eq

Interpret the pattern as a full string equality match, instead of substring.

--regexp, -r

Interpret the pattern as a regular expression, instead of a literal substring.

--ignorecase, -i

Match case-insensitively, for any of substring, equality or regexp match.

io

pmat> find io
IO()=IO::File at 0x55a7e4d88760: ifileno=1 ofileno=1
...

pmat> find io -f 2
IO()=IO::File at 0x55582b87f430: ifileno=2 ofileno=2

Searches for IO handles

Takes the following named options:

--fileno, -f INT

Match only IO handles associated with the given filenumber.

blessed

pmat> find blessed Config
HASH(26)=Config at 0x55bd56c28930

Searches for SVs blessed into the given package name.

lexical

pmat> find lexical $x
UNDEF() at 0x56426e97c8b0: $x at depth 1 of CODE(PP) at 0x56426e97c5e0
...

Searches for SVs that are lexical variables of the given name.

struct

pmat> find struct Module::Name/Type
C_STRUCT(Module::Name/Type) at 0x55e0c3017bf0: Module::Name/Type
...

Searches for SVs that are C structures of the given type name.

magic

pmat> find magic --vtbl 0x7fa73f5421c0
SCALAR(UV) at 0x5632acbddc50: magic type '^', with object ARRAY(1) at 0x5632acbd2f88
...

Searches for SVs that have magic that uses the given MGVTBL address.

--vtbl, -v ADDR

Address of the required MGVTBL

magicv2

pmat> find magicv2 --funcs 0x562c1d39bc20
SCALAR(PV) at 0x562c1fce1070: MagicV2 funcs 0x562c1d39bc20
...

Searches for SVs that have Magic v2 attachments, optionally limited to those which use the given MagicFunctions structure or have the given MgAUXSV.

Takes the following named options:

--funcs, -f ADDR

Returns only attachments that use the given struct MagicFunctions structure address.

--auxsv, -A ADDR

Returns only attachments that have the given SV as the MgAUXSV.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>