Devel:...Inrefs(3pm)
π Devel:...Inrefs β the Devel::MAT::Tool::Inrefs page, but make it make sense π
okay bestie, this is a page from the User Contributed Perl Documentation collection, and it's genuinely so useful, I'm obsessed π«Ά
β¨ NAME β¨
Devel::MAT::Tool::Inrefs β annotate which SVs are referred to by others π
πΈ DESCRIPTION πΈ
So this Devel::MAT tool goes around annotating every single SV with back-references β like, from all the other SVs that refer to it. It literally follows the outrefs method of every heap SV, and then it annotates the referred-to SVs with back-references pointing right back at the SVs that refer to them. it's giving reverse uno card, no cap π
π¦ SV METHODS π¦
This tool adds the following SV methods, and honestly? iconic behaviour.
inrefs
@refs = $sv->inrefs;
Returns a list of Reference objects, one for each of the SVs that refer to this one. It's built by doing the inverse mapping along the SV graph from outrefs. β¨
inrefs_strong / inrefs_weak / inrefs_direct / inrefs_indirect / inrefs_inferred
@refs = $sv->inrefs_strong;
@refs = $sv->inrefs_weak;
@refs = $sv->inrefs_direct;
@refs = $sv->inrefs_indirect;
@refs = $sv->inrefs_inferred;
These return lists of Reference objects filtered by type β analogous to the various outrefs_* methods. so basically, pick your flavour π
β COMANDS β
(yes bestie, COMANDS, that's literally how it's spelled on the page, we don't fix, we appreciate π)
inrefs
pmat> inrefs defstash
s the hash GLOB(%*) at 0x556e47243e40
Shows the incoming references that refer to a given SV. main character energy fr fr.
Takes the following named options:
--weakβ include weak direct references in the output. (by default only strong direct ones get included, just so you know π)--allβ include both weak and indirect references in the output. the whole buffet, periodt.
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk> β thank you king, we appreciate you π«Ά
one tiny heads-up bestie: nothing here is dangerous, it's just a tool that annotates things, so vibe check passed β
and that's the whole page!! written against perl v5.42.3, dated 2026-08-21, source straight from the Devel:...Inrefs(3pm) manual. slay, go read your heap ππ
π¦ 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