.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Devel::MAT::SV 3pm" .TH Devel::MAT::SV 3pm "2023-03-26" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" "Devel::MAT::SV" \- represent a single SV from a heap dump .SH "DESCRIPTION" .IX Header "DESCRIPTION" Objects in this class represent individual \s-1SV\s0 variables found in the arena during a heap dump. Actual types of \s-1SV\s0 are represented by subclasses, which are documented below. .SH "COMMON METHODS" .IX Header "COMMON METHODS" .SS "type" .IX Subsection "type" .Vb 1 \& $type = $sv\->type .Ve .PP Returns the major type of the \s-1SV.\s0 This is the class name minus the \&\f(CW\*(C`Devel::MAT::SV::\*(C'\fR prefix. .SS "basetype" .IX Subsection "basetype" .Vb 1 \& $type = $sv\->basetype .Ve .PP Returns the inner perl \s-1API\s0 type of the \s-1SV.\s0 This is one of .PP .Vb 1 \& SV AV HV CV GV LV PVIO PVFM REGEXP INVLIST OBJ .Ve .SS "desc" .IX Subsection "desc" .Vb 1 \& $desc = $sv\->desc .Ve .PP Returns a string describing the type of the \s-1SV\s0 and giving a short detail of its contents. The exact details depends on the \s-1SV\s0 type. .SS "desc_addr" .IX Subsection "desc_addr" .Vb 1 \& $desc = $sv\->desc_addr .Ve .PP Returns a string describing the \s-1SV\s0 as with \f(CW\*(C`desc\*(C'\fR and giving its address in hex. A useful way to uniquely identify the \s-1SV\s0 when printing. .SS "addr" .IX Subsection "addr" .Vb 1 \& $addr = $sv\->addr .Ve .PP Returns the address of the \s-1SV\s0 .SS "refcnt" .IX Subsection "refcnt" .Vb 1 \& $count = $sv\->refcnt .Ve .PP Returns the \f(CW\*(C`SvREFCNT\*(C'\fR reference count of the \s-1SV\s0 .SS "refcount_adjusted" .IX Subsection "refcount_adjusted" .Vb 1 \& $count = $sv\->refcount_adjusted .Ve .PP Returns the reference count of the \s-1SV,\s0 adjusted to take account of the fact that the \f(CW\*(C`SvREFCNT\*(C'\fR value of the backrefs list of a hash or weakly-referenced object is artificially high. .SS "blessed" .IX Subsection "blessed" .Vb 1 \& $stash = $sv\->blessed .Ve .PP If the \s-1SV\s0 represents a blessed object, returns the stash \s-1SV.\s0 Otherwise returns \&\f(CW\*(C`undef\*(C'\fR. .SS "symname" .IX Subsection "symname" .Vb 1 \& $name = $sv\->symname .Ve .PP Called on an \s-1SV\s0 which is a member of the symbol table, this method returns the perl representation of the full symbol name, including sigil. Otherwise, returns \f(CW\*(C`undef\*(C'\fR. .PP A leading \f(CW\*(C`main::\*(C'\fR prefix is removed for symbols in packages other than \&\f(CW\*(C`main\*(C'\fR. .SS "size" .IX Subsection "size" .Vb 1 \& $size = $sv\->size .Ve .PP Returns the (approximate) size in bytes of the \s-1SV\s0 .SS "magic" .IX Subsection "magic" .Vb 1 \& @magics = $sv\->magic .Ve .PP Returns a list of magic applied to the \s-1SV\s0; each giving the type and target SVs as struct fields: .PP .Vb 4 \& $type = $magic\->type \& $sv = $magic\->obj \& $sv = $magic\->ptr \& $ptr = $magic\->vtbl .Ve .SS "magic_svs" .IX Subsection "magic_svs" .Vb 1 \& @svs = $sv\->magic_svs .Ve .PP A more efficient way to retrieve just the SVs associated with the applied magic. .SS "backrefs" .IX Subsection "backrefs" .Vb 1 \& $av_or_rv = $sv\->backrefs .Ve .PP Returns backrefs \s-1SV,\s0 which may be an \s-1AV\s0 containing the back references, or if there is only one, the \s-1REF SV\s0 itself referring to this. .SS "rootname" .IX Subsection "rootname" .Vb 1 \& $rootname = $sv\->rootname .Ve .PP If the \s-1SV\s0 is a well-known root, this method returns its name. Otherwise returns \f(CW\*(C`undef\*(C'\fR. .SS "outrefs" .IX Subsection "outrefs" .Vb 1 \& @refs = $sv\->outrefs .Ve .PP 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 \s-1RV,\s0 or inferred by \f(CW\*(C`Devel::MAT\*(C'\fR itself. .PP Each object is a structure of three fields: .IP "name => \s-1STRING\s0" 4 .IX Item "name => STRING" A human-readable string for identification purposes. .ie n .IP "strength => ""strong""|""weak""|""indirect""|""inferred""" 4 .el .IP "strength => ``strong''|``weak''|``indirect''|``inferred''" 4 .IX Item "strength => strong|weak|indirect|inferred" Identifies what kind of reference it is. \f(CW\*(C`strong\*(C'\fR references contribute to the \f(CW\*(C`refcount\*(C'\fR of the referrant, others do not. \f(CW\*(C`strong\*(C'\fR and \f(CW\*(C`weak\*(C'\fR references are \s-1SV\s0 addresses found directly within the referring \s-1SV\s0 structure; \&\f(CW\*(C`indirect\*(C'\fR and \f(CW\*(C`inferred\*(C'\fR references are extra return values added here for convenience by examining the surrounding structure. .IP "sv => \s-1SV\s0" 4 .IX Item "sv => SV" The referrant \s-1SV\s0 itself. .SS "outrefs_strong" .IX Subsection "outrefs_strong" .Vb 1 \& @refs = $sv\->outrefs_strong .Ve .PP Returns the subset of \f(CW\*(C`outrefs\*(C'\fR that are direct strong references. .SS "outrefs_weak" .IX Subsection "outrefs_weak" .Vb 1 \& @refs = $sv\->outrefs_weak .Ve .PP Returns the subset of \f(CW\*(C`outrefs\*(C'\fR that are direct weak references. .SS "outrefs_direct" .IX Subsection "outrefs_direct" .Vb 1 \& @refs = $sv\->outrefs_direct .Ve .PP Returns the subset of \f(CW\*(C`outrefs\*(C'\fR that are direct strong or weak references. .SS "outrefs_indirect" .IX Subsection "outrefs_indirect" .Vb 1 \& @refs = $sv\->outrefs_indirect .Ve .PP Returns the subset of \f(CW\*(C`outrefs\*(C'\fR that are indirect references via RVs. .SS "outrefs_inferred" .IX Subsection "outrefs_inferred" .Vb 1 \& @refs = $sv\->outrefs_inferred .Ve .PP Returns the subset of \f(CW\*(C`outrefs\*(C'\fR that are not directly stored in the \s-1SV\s0 structure, but instead inferred by \f(CW\*(C`Devel::MAT\*(C'\fR itself. .SS "outref_named" .IX Subsection "outref_named" .Vb 1 \& $ref = $sv\->outref_named( $name ) .Ve .PP \&\fISince version 0.49.\fR .PP Looks for a reference whose name is exactly that given, and returns it if so. .PP Throws an exception if the \s-1SV\s0 has no such outref of that name. .SS "maybe_outref_named" .IX Subsection "maybe_outref_named" .Vb 1 \& $ref = $sv\->maybe_outref_named( $name ) .Ve .PP \&\fISince version 0.49.\fR .PP As \*(L"outref_named\*(R" but returns \f(CW\*(C`undef\*(C'\fR if there is no such reference. .SS "is_mortal" .IX Subsection "is_mortal" .Vb 1 \& $mortal = $sv\->is_mortal .Ve .PP Returns true if this \s-1SV\s0 is referenced by the temps stack. .SH "IMMORTAL SVs" .IX Header "IMMORTAL SVs" Three special \s-1SV\s0 objects exist outside of the heap, to represent \f(CW\*(C`undef\*(C'\fR and boolean true and false. They are .IP "\(bu" 4 Devel::MAT::SV::UNDEF .IP "\(bu" 4 Devel::MAT::SV::YES .IP "\(bu" 4 Devel::MAT::SV::NO .SH "Devel::MAT::SV::GLOB" .IX Header "Devel::MAT::SV::GLOB" Represents a glob; an \s-1SV\s0 of type \f(CW\*(C`SVt_PVGV\*(C'\fR. .SS "file" .IX Subsection "file" .SS "line" .IX Subsection "line" .SS "location" .IX Subsection "location" .Vb 1 \& $file = $gv\->file \& \& $line = $gv\->line \& \& $location = $gv\->location .Ve .PP Returns the filename, line number, or combined location (\f(CW\*(C`FILE line LINE\*(C'\fR) that the \s-1GV\s0 first appears at. .SS "name" .IX Subsection "name" .Vb 1 \& $name = $gv\->name .Ve .PP Returns the value of the \f(CW\*(C`GvNAME\*(C'\fR field, for named globs. .SS "stash" .IX Subsection "stash" .Vb 1 \& $stash = $gv\->stash .Ve .PP Returns the stash to which the \s-1GV\s0 belongs. .SS "scalar" .IX Subsection "scalar" .SS "array" .IX Subsection "array" .SS "hash" .IX Subsection "hash" .SS "code" .IX Subsection "code" .SS "egv" .IX Subsection "egv" .SS "io" .IX Subsection "io" .SS "form" .IX Subsection "form" .Vb 1 \& $sv = $gv\->scalar \& \& $av = $gv\->array \& \& $hv = $gv\->hash \& \& $cv = $gv\->code \& \& $gv = $gv\->egv \& \& $io = $gv\->io \& \& $form = $gv\->form .Ve .PP Return the \s-1SV\s0 in the various glob slots. .SH "Devel::MAT::SV::SCALAR" .IX Header "Devel::MAT::SV::SCALAR" Represents a non-referential scalar value; an \s-1SV\s0 of any of the types up to and including \f(CW\*(C`SVt_PVMV\*(C'\fR (that is, \f(CW\*(C`IV\*(C'\fR, \f(CW\*(C`NV\*(C'\fR, \f(CW\*(C`PV\*(C'\fR, \f(CW\*(C`PVIV\*(C'\fR, \f(CW\*(C`PVNV\*(C'\fR or \&\f(CW\*(C`PVMG\*(C'\fR). This includes all numbers, integers and floats, strings, and dualvars containing multiple parts. .SS "uv" .IX Subsection "uv" .Vb 1 \& $uv = $sv\->uv .Ve .PP Returns the integer numeric portion as an unsigned value, if valid, or \f(CW\*(C`undef\*(C'\fR. .SS "iv" .IX Subsection "iv" .Vb 1 \& $iv = $sv\->iv .Ve .PP Returns the integer numeric portion as a signed value, if valid, or \f(CW\*(C`undef\*(C'\fR. .SS "nv" .IX Subsection "nv" .Vb 1 \& $nv = $sv\->nv .Ve .PP Returns the floating numeric portion, if valid, or \f(CW\*(C`undef\*(C'\fR. .SS "pv" .IX Subsection "pv" .Vb 1 \& $pv = $sv\->pv .Ve .PP Returns the string portion, if valid, or \f(CW\*(C`undef\*(C'\fR. .SS "pvlen" .IX Subsection "pvlen" .Vb 1 \& $pvlen = $sv\->pvlen .Ve .PP Returns the length of the string portion, if valid, or \f(CW\*(C`undef\*(C'\fR. .SS "qq_pv" .IX Subsection "qq_pv" .Vb 1 \& $str = $sv\->qq_pv( $maxlen ) .Ve .PP Returns the \s-1PV\s0 string, if defined, suitably quoted. If \f(CW$maxlen\fR is defined and the \s-1PV\s0 is longer than this, it is truncated and \f(CW\*(C`...\*(C'\fR is appended after the containing quote marks. .SS "ourstash" .IX Subsection "ourstash" .Vb 1 \& $stash = $sv\->ourstash .Ve .PP Returns the stash of the \s-1SCALAR,\s0 if it is an '\f(CW\*(C`our\*(C'\fR' variable. .PP After perl 5.20 this is no longer used, and will return \f(CW\*(C`undef\*(C'\fR. .SH "Devel::MAT::SV::REF" .IX Header "Devel::MAT::SV::REF" Represents a referential scalar; any SCALAR-type \s-1SV\s0 with the \f(CW\*(C`SvROK\*(C'\fR flag set. .SS "rv" .IX Subsection "rv" .Vb 1 \& $svrv = $sv\->rv .Ve .PP Returns the \s-1SV\s0 referred to by the reference. .SS "is_weak" .IX Subsection "is_weak" .Vb 1 \& $weak = $sv\->is_weak .Ve .PP Returns true if the \s-1SV\s0 is a weakened \s-1RV\s0 reference. .SS "ourstash" .IX Subsection "ourstash" .Vb 1 \& $stash = $sv\->ourstash .Ve .PP Returns the stash of the \s-1SCALAR,\s0 if it is an '\f(CW\*(C`our\*(C'\fR' variable. .SH "Devel::MAT::SV::ARRAY" .IX Header "Devel::MAT::SV::ARRAY" Represents an array; an \s-1SV\s0 of type \f(CW\*(C`SVt_PVAV\*(C'\fR. .SS "is_unreal" .IX Subsection "is_unreal" .Vb 1 \& $unreal = $av\->is_unreal .Ve .PP Returns true if the \f(CW\*(C`AvREAL()\*(C'\fR flag is not set on the array \- i.e. that its \&\s-1SV\s0 pointers do not contribute to the \f(CW\*(C`SvREFCNT\*(C'\fR of the SVs it points at. .SS "is_backrefs" .IX Subsection "is_backrefs" .Vb 1 \& $backrefs = $av\->is_backrefs .Ve .PP Returns true if the array contains the backrefs list of a hash or weakly-referenced object. .SS "elems" .IX Subsection "elems" .Vb 1 \& @svs = $av\->elems .Ve .PP Returns all of the element SVs in a list .SS "elem" .IX Subsection "elem" .Vb 1 \& $sv = $av\->elem( $index ) .Ve .PP Returns the \s-1SV\s0 at the given index .SH "Devel::MAT::SV::PADLIST" .IX Header "Devel::MAT::SV::PADLIST" A subclass of \s-1ARRAY,\s0 this is used to represent the \s-1PADLIST\s0 of a \s-1CODE SV.\s0 .SH "Devel::MAT::SV::PADNAMES" .IX Header "Devel::MAT::SV::PADNAMES" A subclass of \s-1ARRAY,\s0 this is used to represent the \s-1PADNAMES\s0 of a \s-1CODE SV.\s0 .SS "padname" .IX Subsection "padname" .Vb 1 \& $padname = $padnames\->padname( $padix ) .Ve .PP Returns the name of the lexical at the given index, or \f(CW\*(C`undef\*(C'\fR .SS "padix_from_padname" .IX Subsection "padix_from_padname" .Vb 1 \& $padix = $padnames\->padix_from_padname( $padname ) .Ve .PP Returns the index of the lexical with the given name, or \f(CW\*(C`undef\*(C'\fR .SH "Devel::MAT::SV::PAD" .IX Header "Devel::MAT::SV::PAD" A subclass of \s-1ARRAY,\s0 this is used to represent a \s-1PAD\s0 of a \s-1CODE SV.\s0 .SS "padcv" .IX Subsection "padcv" .Vb 1 \& $cv = $pad\->padcv .Ve .PP Returns the \f(CW\*(C`CODE\*(C'\fR \s-1SV\s0 for which this is a pad. .SS "lexvars" .IX Subsection "lexvars" .Vb 1 \& ( $name, $sv, $name, $sv, ... ) = $pad\->lexvars .Ve .PP Returns a name/value list of the lexical variables in the pad. .SS "maybe_lexvar" .IX Subsection "maybe_lexvar" .Vb 1 \& $sv = $pad\->maybe_lexvar( $padname ) .Ve .PP \&\fISince version 0.49.\fR .PP Returns the \s-1SV\s0 associated with the given padname if one exists, or \f(CW\*(C`undef\*(C'\fR if not. .PP Used to be named \f(CW\*(C`lexvar\*(C'\fR. .SH "Devel::MAT::SV::HASH" .IX Header "Devel::MAT::SV::HASH" Represents a hash; an \s-1SV\s0 of type \f(CW\*(C`SVt_PVHV\*(C'\fR. The \f(CW\*(C`Devel::MAT::SV::STASH\*(C'\fR subclass is used to represent hashes that are used as stashes. .SS "keys" .IX Subsection "keys" .Vb 1 \& @keys = $hv\->keys .Ve .PP Returns the set of keys present in the hash, as plain perl strings, in no particular order. .SS "value" .IX Subsection "value" .Vb 1 \& $sv = $hv\->value( $key ) .Ve .PP Returns the \s-1SV\s0 associated with the given key .SS "values" .IX Subsection "values" .Vb 1 \& @svs = $hv\->values .Ve .PP Returns all of the SVs stored as values, in no particular order (though, in an order corresponding to the order returned by \f(CW\*(C`keys\*(C'\fR). .SH "Devel::MAT::SV::STASH" .IX Header "Devel::MAT::SV::STASH" Represents a hash used as a stash; an \s-1SV\s0 of type \f(CW\*(C`SVt_PVHV\*(C'\fR whose \f(CW\*(C`HvNAME()\*(C'\fR is non-NULL. This is a subclass of \f(CW\*(C`Devel::MAT::SV::HASH\*(C'\fR. .SS "mro_linear_all" .IX Subsection "mro_linear_all" .SS "mro_linearcurrent" .IX Subsection "mro_linearcurrent" .SS "mro_nextmethod" .IX Subsection "mro_nextmethod" .SS "mro_isa" .IX Subsection "mro_isa" .Vb 1 \& $hv = $stash\->mro_linear_all \& \& $sv = $stash\->mro_linearcurrent \& \& $sv = $stash\->mro_nextmethod \& \& $av = $stash\->mro_isa .Ve .PP Returns the fields from the \s-1MRO\s0 structure .SS "value_code" .IX Subsection "value_code" .Vb 1 \& $cv = $stash\->value_code( $key ) .Ve .PP Returns the \s-1CODE\s0 associated with the given symbol name, if it exists, or \&\f(CW\*(C`undef\*(C'\fR if not. This is roughly equivalent to .PP .Vb 1 \& $cv = $stash\->value( $key )\->code .Ve .PP Except that it is aware of the direct reference to CVs that perl 5.22 will optimise for. This method should be used in preference to the above construct. .SS "stashname" .IX Subsection "stashname" .Vb 1 \& $name = $stash\->stashname .Ve .PP Returns the name of the stash .SH "Devel::MAT::SV::CODE" .IX Header "Devel::MAT::SV::CODE" Represents a function or closure; an \s-1SV\s0 of type \f(CW\*(C`SVt_PVCV\*(C'\fR. .SS "stash" .IX Subsection "stash" .SS "glob" .IX Subsection "glob" .SS "file" .IX Subsection "file" .SS "line" .IX Subsection "line" .SS "scope" .IX Subsection "scope" .SS "padlist" .IX Subsection "padlist" .SS "constval" .IX Subsection "constval" .SS "oproot" .IX Subsection "oproot" .SS "depth" .IX Subsection "depth" .Vb 1 \& $stash = $cv\->stash \& \& $gv = $cv\->glob \& \& $filename = $cv\->file \& \& $line = $cv\->line \& \& $scope_cv = $cv\->scope \& \& $av = $cv\->padlist \& \& $sv = $cv\->constval \& \& $addr = $cv\->oproot \& \& $depth = $cv\->depth .Ve .PP Returns the stash, glob, filename, line number, scope, padlist, constant value, oproot or depth of the code. .SS "location" .IX Subsection "location" .Vb 1 \& $location = $cv\->location .Ve .PP Returns \f(CW\*(C`FILE line LINE\*(C'\fR if the line is defined, or \f(CW\*(C`FILE\*(C'\fR if not. .SS "is_clone" .IX Subsection "is_clone" .SS "is_cloned" .IX Subsection "is_cloned" .SS "is_xsub" .IX Subsection "is_xsub" .SS "is_weakoutside" .IX Subsection "is_weakoutside" .SS "is_cvgv_rc" .IX Subsection "is_cvgv_rc" .SS "is_lexical" .IX Subsection "is_lexical" .Vb 1 \& $clone = $cv\->is_clone \& \& $cloned = $cv\->is_cloned \& \& $xsub = $cv\->is_xsub \& \& $weak = $cv\->is_weakoutside \& \& $rc = $cv\->is_cvgv_rc \& \& $lexical = $cv\->is_lexical .Ve .PP Returns the \f(CW\*(C`CvCLONE()\*(C'\fR, \f(CW\*(C`CvCLONED()\*(C'\fR, \f(CW\*(C`CvISXSUB()\*(C'\fR, \f(CW\*(C`CvWEAKOUTSIDE()\*(C'\fR, \&\f(CW\*(C`CvCVGV_RC()\*(C'\fR and \f(CW\*(C`CvLEXICAL()\*(C'\fR flags. .SS "protosub" .IX Subsection "protosub" .Vb 1 \& $protosub = $cv\->protosub .Ve .PP Returns the protosub \s-1CV,\s0 if known, for a closure \s-1CV.\s0 .SS "constants" .IX Subsection "constants" .Vb 1 \& @svs = $cv\->constants .Ve .PP 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. .SS "globrefs" .IX Subsection "globrefs" .Vb 1 \& @svs = $cv\->globrefs .Ve .PP Returns a list of the SVs used as \s-1GLOB\s0 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. .SS "padname" .IX Subsection "padname" .Vb 1 \& $padname = $cv\->padname( $padix ) .Ve .PP Returns the name of the \f(CW$padix\fR'th lexical variable, or \f(CW\*(C`undef\*(C'\fR if it doesn't have a name. .PP The returned padname is a structure of the following fields: .PP .Vb 1 \& $name = $padname\->name \& \& $bool = $padname\->is_outer \& $bool = $padname\->is_state \& $bool = $padname\->is_lvalue \& $bool = $padname\->is_typed \& $bool = $padname\->is_our \& $bool = $padname\->is_field .Ve .SS "padix_from_padname" .IX Subsection "padix_from_padname" .Vb 1 \& $padix = $cv\->padix_from_padname( $padname ) .Ve .PP Returns the index of the first lexical variable with the given pad name, or \&\f(CW\*(C`undef\*(C'\fR if one does not exist. .SS "max_padix" .IX Subsection "max_padix" .Vb 1 \& $max_padix = $cv\->max_padix .Ve .PP Returns the maximum valid pad index. .PP This is typically used to create a list of potential pad indexes, such as .PP .Vb 1 \& 0 .. $cv\->max_padix .Ve .PP Note that since pad slots may contain things other than lexical variables, not every pad slot between 0 and this index will necessarily contain a lexical variable or have a pad name. .SS "padnames_av" .IX Subsection "padnames_av" .Vb 1 \& $padnames_av = $cv\->padnames_av .Ve .PP Returns the \s-1AV\s0 reference directly which stores the pad names. .PP After perl version 5.20, this is no longer used directly and will return \&\f(CW\*(C`undef\*(C'\fR. The individual pad names themselves can still be found via the \&\f(CW\*(C`padname\*(C'\fR method. .SS "pads" .IX Subsection "pads" .Vb 1 \& @pads = $cv\->pads .Ve .PP Returns a list of the actual pad AVs. .SS "pad" .IX Subsection "pad" .Vb 1 \& $pad = $cv\->pad( $depth ) .Ve .PP Returns the \s-1PAD\s0 at the given depth (given by 1\-based index). .SS "maybe_lexvar" .IX Subsection "maybe_lexvar" .Vb 1 \& $sv = $cv\->maybe_lexvar( $padname, $depth ) .Ve .PP \&\fISince version 0.49.\fR .PP Returns the \s-1SV\s0 on the \s-1PAD\s0 associated with the given padname, at the optionally-given depth (1\-based index). If \fI\f(CI$depth\fI\fR is not provided, the topmost live \s-1PAD\s0 will be used. If no variable exists of the given name returns \&\f(CW\*(C`undef\*(C'\fR. .PP Used to be called \f(CW\*(C`lexvar\*(C'\fR. .SH "Devel::MAT::SV::IO" .IX Header "Devel::MAT::SV::IO" Represents an \s-1IO\s0 handle; an \s-1SV\s0 type of \f(CW\*(C`SVt_PVIO\*(C'\fR. .SS "ifileno" .IX Subsection "ifileno" .SS "ofileno" .IX Subsection "ofileno" .Vb 1 \& $ifileno = $io\->ifileno \& \& $ofileno = $io\->ofileno .Ve .PP Returns the input or output file numbers. .SH "Devel::MAT::SV::OBJECT" .IX Header "Devel::MAT::SV::OBJECT" Represents an object instance; an \s-1SV\s0 of type \f(CW\*(C`SVt_PVOBJ\*(C'\fR. These are only present in files from perls with \f(CW\*(C`feature \*(Aqclass\*(Aq\*(C'\fR. .SS "fields" .IX Subsection "fields" .Vb 1 \& @svs = $obj\->fields .Ve .PP Returns all the values of all the fields in a list. .PP Note that to find the names of the fields you'll have to enquire with the class .SS "field" .IX Subsection "field" .Vb 1 \& $sv = $obj\->field( $name_or_fieldix ) .Ve .PP Returns the value of the given field; which may be specified by name or index directly. .SH "Devel::MAT::SV::CLASS" .IX Header "Devel::MAT::SV::CLASS" Represents a class; a sub-type of stash for implementing object classes. These are only present in files from perls with \f(CW\*(C`feature \*(Aqclass\*(Aq\*(C'\fR. .SS "fields" .IX Subsection "fields" .Vb 1 \& @fields = $class\->fields .Ve .PP Returns a list of the field definitions of the class, in declaration order. Each is a structure whose form is given below. .SS "field" .IX Subsection "field" .Vb 1 \& $field = $class\->field( $name_or_fieldix ) .Ve .PP Returns the field definition of the given field; which may be specified by name or index directly. Throws an exception if none such exists. .PP The returned field is a structure of the following fields: .PP .Vb 2 \& $fieldix = $field\->fieldix \& $name = $field\->name .Ve .SS "maybe_field" .IX Subsection "maybe_field" .Vb 1 \& $field = $class\->maybe_field( $name_or_fieldix ) .Ve .PP \&\fISince version 0.49.\fR .PP Similar to \*(L"field\*(R" but returns undef if none such exists. .SH "Devel::MAT::SV::C_STRUCT" .IX Header "Devel::MAT::SV::C_STRUCT" Represents a C\-level c type. .SS "fields" .IX Subsection "fields" .Vb 1 \& @kvlist = $struct\->fields .Ve .PP Returns an even-sized name/value list of all the field values stored by the struct; each preceeded by its field type structure. .SS "field_named" .IX Subsection "field_named" .Vb 1 \& $val = $struct\->field_named( $name ) .Ve .PP Looks for a field whose name is exactly that given, and returns its value. .PP Throws an exception if the struct has no such field of that name. .SS "maybe_field_named" .IX Subsection "maybe_field_named" .Vb 1 \& $val = $struct\->maybe_field_named( $name ) .Ve .PP \&\fISince version 0.49.\fR .PP As \*(L"field_named\*(R" but returns \f(CW\*(C`undef\*(C'\fR if there is no such field. .SS "structtype" .IX Subsection "structtype" .Vb 1 \& $structtype = $struct\->structtype .Ve .PP Returns a metadata structure describing the type of the struct itself. .PP Has the following named accessors .IP "name => \s-1STRING\s0" 4 .IX Item "name => STRING" The name of the struct type, as given by the dumpfile. .IP "fields => ARRAY[ Field ]" 4 .IX Item "fields => ARRAY[ Field ]" An \s-1ARRAY\s0 reference containing the definitions of each field in turn .SH "AUTHOR" .IX Header "AUTHOR" Paul Evans