GO::Mo...stance(3pm)

πŸ“¦
version 0.15 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

GO::Model::GraphNodeInstance β€” bestie, it's literally just a graph node that's chilling inside a tree 🌳✨


✨ SYNOPSIS ✨

okay so here's the vibe, no cap:

$it = $graph->create_iterator;
# returns a GO::Model::GraphIterator object

while (my $ni = $it->next_node_instance) {
  $depth = $ni->depth;
  $term = $ni->term;
  $reltype = $ni->parent_rel->type;
  printf
    "%s %8s Term = %s (%s)  // depth=%d\n",
        "----" x $depth,
        $reltype,
        $term->name,
        $term->public_acc,
        $depth;
}

like… you grab an iterator off the graph, loop through every node instance, and print each one with pretty little indent dashes based on how deep it is. it's giving recursive tree traversal core πŸ’…


🌸 DESCRIPTION 🌸

go check out GO::Model::Graph for the whole story, bestie 🫢

πŸ¦‹ term

  • Usage β€” (nothing, it's a no-arg situation)
  • Returns β€” GO::Model::Term
  • Args β€” (also nothing)

see GO::Model::Term for the tea β˜•

πŸ¦‹ depth

  • Usage β€” (zilch)
  • Returns β€” int
  • Args β€” (nada)

like, just how many levels deep you are in the tree, fr fr 🌲

πŸ¦‹ parent_rel

  • Usage β€” (empty, she takes no args)
  • Returns β€” GO::Model::Relationship
  • Args β€” (none whatsoever)

see GO::Model::Relationship and you'll get it, iykyk 😌


lowkey the Usage and Args sections are all empty in the original too β€” not me skipping them, they genuinely have nothing in them bestie 😭

GO::Model::GraphNodeInstance β€” part of the GO::Model family, living in the User Contributed Perl Documentation, shipped with perl v5.36.0 and dated 2023-12-18 πŸŽ€ that's a wrap, slay, periodt πŸ’–βœ¨

πŸ“¦ where this page comes from