Devel::MAT::SV - represent a single SV from a heap dump
Devel::MAT::SV
Objects in this class represent individual SV variables found in the arena during a heap dump. Actual types of SV are represented by subclasses, which are documented below.
Returns the major type of the SV. This is the class name minus the Devel::MAT::SV:: prefix.
Devel::MAT::SV::
Returns a string describing the type of the SV and giving a short detail of its contents. The exact details depends on the SV type.
Returns a string describing the SV as with desc and giving its address in hex. A useful way to uniquely identify the SV when printing.
desc
Returns the address of the SV
Returns the SvREFCNT reference count of the SV
SvREFCNT
Returns the reference count of the SV, adjusted to take account of the fact that the SvREFCNT value of the backrefs list of a hash or weakly-referenced object is artificially high.
If the SV represents a blessed object, returns the stash SV. Otherwise returns undef.
undef
Returns the (approximate) size in bytes of the SV
Returns a pair list of magic applied to the SV; each giving the type and target SV.
Returns backrefs SV, which may be an AV containing the back references, or if there is only one, the REF SV itself referring to this.
Returns a list of Reference objects for each of the SVs that this one refers to, either directly by strong or weak reference, indirectly via RV, or inferred by Devel::MAT itself.
Devel::MAT
Each object is a structure of three fields:
A human-readable string for identification purposes.
Identifies what kind of reference it is. strong references contribute to the refcount of the referrant, others do not. strong and weak references are SV addresses found directly within the referring SV structure; indirect and inferred references are extra return values added here for convenience by examining the surrounding structure.
strong
refcount
weak
indirect
inferred
The referrant SV itself.
Returns the subset of outrefs that are direct strong references.
outrefs
Returns the subset of outrefs that are direct weak references.
Returns the subset of outrefs that are direct strong or weak references.
Returns the subset of outrefs that are indirect references via RVs.
Returns the subset of outrefs that are not directly stored in the SV structure, but instead inferred by Devel::MAT itself.
Three special SV objects exist outside of the heap, to represent undef and boolean true and false. They are
Devel::MAT::SV::UNDEF
Devel::MAT::SV::YES
Devel::MAT::SV::NO
Represents a glob; an SV of type SVt_PVGV.
SVt_PVGV
Returns the filename, line number, or combined location (FILE line LINE) that the GV first appears at.
FILE line LINE
Returns the stash to which the GV belongs.
Return the SV in the various glob slots.
Represents a non-referential scalar value; an SV of any of the types up to and including SVt_PVMV (that is, IV, NV, PV, PVIV, PVNV or PVMG). This includes all numbers, integers and floats, strings, and dualvars containing multiple parts.
SVt_PVMV
IV
NV
PV
PVIV
PVNV
PVMG
Returns the integer numeric portion as an unsigned value, if valid, or undef.
Returns the integer numeric portion as a signed value, if valid, or undef.
Returns the floating numeric portion, if valid, or undef.
Returns the string portion, if valid, or undef.
Returns the length of the string portion, if valid, or undef.
Returns the PV string, if defined, suitably quoted. If $maxlen is defined and the PV is longer than this, it is truncated and ... is appended after the containing quote marks.
$maxlen
...
Returns the stash of the SCALAR, if it is an 'our' variable.
our
Represents a referential scalar; any SCALAR-type SV with the SvROK flag set.
SvROK
Returns the SV referred to by the reference.
Returns true if the SV is a weakened RV reference.
Represents an array; an SV of type SVt_PVAV.
SVt_PVAV
Returns true if the AvREAL() flag is not set on the array - i.e. that its SV pointers do not contribute to the SvREFCNT of the SVs it points at.
AvREAL()
Returns true if the array contains the backrefs list of a hash or weakly-referenced object.
Returns all of the element SVs in a list
Returns the SV at the given index
A subclass of ARRAY, this is used to represent the PADLIST of a CODE SV.
A subclass of ARRAY, this is used to represent the PADNAMES of a CODE SV.
Returns the name of the lexical at the given index, or undef
A subclass of ARRAY, this is used to represent a PAD of a CODE SV.
Returns a name/value list of the lexical variables in the pad.
Represents a hash; an SV of type SVt_PVHV. The Devel::MAT::SV::STASH subclass is used to represent hashes that are used as stashes.
SVt_PVHV
Devel::MAT::SV::STASH
Returns the set of keys present in the hash, as plain perl strings, in no particular order.
Returns the SV associated with the given key
Returns all of the SVs stored as values, in no particular order.
Represents a hash used as a stash; an SV of type SVt_PVHV whose HvNAME() is non-NULL. This is a subclass of Devel::MAT::SV::HASH.
HvNAME()
Devel::MAT::SV::HASH
Returns the fields from the MRO structure
Returns the name of the stash
Represents a function or closure; an SV of type SVt_PVCV.
SVt_PVCV
Returns the stash, glob, filename, line number, scope, padlist, constant value or oproot of the code.
Returns FILE line LINE if the line is defined, or FILE if not.
FILE
Returns the CvCLONE(), CvCLONED(), CvISXSUB(), CvWEAKOUTSIDE() and CvCVGV_RC() flags.
CvCLONE()
CvCLONED()
CvISXSUB()
CvWEAKOUTSIDE()
CvCVGV_RC()
Returns the protosub CV, if known, for a closure CV.
Returns a list of the SVs used as constants or method names in the code. On ithreads perl the constants are part of the padlist structure so this list is constructed from parts of the padlist at loading time.
Returns a list of the SVs used as GLOB references in the code. On ithreads perl the constants are part of the padlist structure so this list is constructed from parts of the padlist at loading time.
Returns the name of the $padix'th lexical variable, or undef if it doesn't have a name
Returns the AV reference directly which stores the pad names.
Returns a list of the actual pad AVs.
Returns the PAD at the given depth
Paul Evans <leonerd@leonerd.org.uk>
To install Devel::MAT, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::MAT
CPAN shell
perl -MCPAN -e shell install Devel::MAT
For more information on module installation, please visit the detailed CPAN module installation guide.