B::CV#
Functions#
B::CV methods#
GV#
Return the B::GV that a named CV belongs to.
STASH#
Return the B::HV for the package the CV was compiled in.
FILE#
Return the source filename the CV was compiled from.
Synopsis
print $cv->FILE; # e.g. "MyModule.pm"
Returns an empty string for XSUBs that do not carry a file record.
ROOT#
Return the root op of the CV’s optree, or B::NULL for an XSUB.
Synopsis
my $root = $cv->ROOT;
XSUBs carry compiled C code and have no optree, so ROOT returns a B::NULL. Test with $cv->CvFLAGS & B::CVf_ISXSUB first if it matters.
XSUB#
Return the CV’s C function pointer as an integer, or 0 for a Perl sub.
Synopsis
my $addr = $cv->XSUB; # non-zero iff the sub is an XSUB
XSUBANY#
Return CvXSUBANY - per-XSUB private data.
Synopsis
my $any = $cv->XSUBANY; # any_iv; 0 for Perl subs
my $sv = $const_cv->XSUBANY; # B object of the constant for CvCONST subs
START#
Return the first op executed in the CV’s body, or B::NULL for an XSUB.
DEPTH#
Return the current recursion depth of the sub.
CvFLAGS#
Return the raw CvFLAGS word of the CV.
NAME_HEK#
Return the CV’s name when it was stored as a HEK rather than via a GV.
OUTSIDE#
Return the lexically enclosing CV (CvOUTSIDE).
PADLIST#
Return the CV’s padlist as a B::PADLIST, or B::NULL for an XSUB.
OUTSIDE_SEQ#
Return the COP sequence number at which the CV was closed over.
CONST#
Return CVf_CONST if the CV is a constant (inlinable) sub, else 0.
HSCXT#
Return the XS handshake context pointer as an integer, or 0 for a Perl sub.
const_sv#
Return the SV a constant sub yields, as a B:: object (const_sv).