Devel:...Context(3pm)
π Devel::MAT::Context β the manual page, but make it cute π
okay bestie, this is Devel:...Context(3pm) from the User Contributed Perl Documentation collection, and it's literally all about representing one single call context state. slay.
β¨ NAME β¨
Devel::MAT::Context β represent a single call context state π«Ά
πΈ DESCRIPTION πΈ
so. objects in this class each represent one level of state from the call context. no cap. and these contexts? they represent function calls between perl functions. that's the whole vibe. π
π COMMON METHODS π
the methods everybody gets, no matter what kind of context they are:
π gimme
$gimme = $ctx->gimme;
hands you back the gimme value of the call context. yes that's really what it's called, iykyk β¨
π¦ file, line, location
$file = $ctx->file;
$line = $ctx->line;
$location = $ctx->location;
these three give you the file, the line, or the location β and the location comes formatted like ("FILE line LINE"). iconic little trio fr fr π
π Devel::MAT::Context::SUB π
this one represents a context that is a subroutine call. main character energy, honestly.
π cv
$cv = $ctx->cv;
returns the CV</> which this call is to. (yes, the CV. the code-y one. you got this π )
wait, careful with that tag β let me say it clean: it returns the CV which this call is to. β¨
π§ args
$args = $ctx->args;
returns the arguments AV β aka the thing that represents the @_ argument array. the whole squad of args, together π«Ά
π olddepth
$olddepth = $ctx->olddepth;
returns the old depth of the context β which is lowkey just "the depth the CV would be at after this context returns". think of it as the depth it's heading back to π«
π depth
$depth = $ctx->depth;
returns the actual depth of the context. and here's the tea: this is inferred at load time, by looking at the olddepth of the next inner-nested call to the same CV β or, if no other call exists, from the actual depth of the CV. clever girl behavior, honestly π₯
π Devel::MAT::Context::TRY π
this class represents a context which is a block eval {} call. block eval girlies, this one's for you π
β Devel::MAT::Context::EVAL β
this one represents a context which is a string eval EXPR call. the stringy sibling β¨
π¦ code
$sv = $ctx->code;
returns the SV containing the text string that's being evaluated. it's giving the vibes, evaluated π
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk> β thank you for your service, king π
okay that's the whole page bestie, no skips, no shortcuts, we ate and left no crumbs π½οΈβ¨
this cutie was documented for perl v5.42.3, dated 2026-08-21, as part of Devel:...Context(3pm) β and that's a wrap, mwah πππ¦
π¦ where this page comes from
- ubuntu stonking: libdevel-mat-perl 0.54-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms