logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

"Devel::MAT::Tool::Inrefs" - annotate which SVs are referred to by others

Author

       Paul Evans <leonerd@leonerd.org.uk>

perl v5.40.0                                       2024-10-20                      Devel::MAT::Tool::Inrefs(3pm)

Comands

inrefs
          pmat> inrefs defstash
          s  the hash  GLOB(%*) at 0x556e47243e40

       Shows the incoming references that refer to a given SV.

       Takes the following named options:

       --weak
           Include weak direct references in the output (by default only strong direct ones will be included).

       --all
           Include both weak and indirect references in the output.

Description

       This "Devel::MAT" tool annotates each SV with back-references from other SVs that refer to it. It follows
       the "outrefs" method of every heap SV and annotates the referred SVs with back-references pointing back
       to the SVs that refer to them.

Name

       "Devel::MAT::Tool::Inrefs" - annotate which SVs are referred to by others

Sv Methods

       This tool adds the following SV methods.

   inrefs
          @refs = $sv->inrefs;

       Returns a list of Reference objects for each of the SVs that refer to this one. This is formed by the
       inverse mapping along the SV graph from "outrefs".

   inrefs_stronginrefs_weakinrefs_directinrefs_indirectinrefs_inferred
          @refs = $sv->inrefs_strong;

          @refs = $sv->inrefs_weak;

          @refs = $sv->inrefs_direct;

          @refs = $sv->inrefs_indirect;

          @refs = $sv->inrefs_inferred;

       Returns lists of Reference objects filtered by type, analogous to the various "outrefs_*" methods.

See Also