GO::Mo...stance(3pm)
π 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 theUsageandArgssections 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
- debian trixie: libgo-perl 0.15-10 Β· Perl
- ubuntu noble: libgo-perl 0.15-10 Β· Perl
- ubuntu resolute: libgo-perl 0.15-10 Β· Perl
- ubuntu stonking: libgo-perl 0.15-10 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms