GO::ObjFactory(3pm)
π GO::ObjFactory β the manual, but make it cute π
okay bestie, so this one is from User Contributed Perl Documentation and it's the page for GO::ObjFactory in perl v5.36.0. Let's get into it π
β¨ NAME β¨
GO::ObjFactory β the GO Object Factory πβ¨
πΈ SYNOPSIS πΈ
lowkey the whole synopsis is just this vibe check: you should not be calling this method directly. nope. not you. not today. π«
π¦ DESCRIPTION π¦
okay so here's the tea, fr fr: you only need to be aware of this class if you're out here generating brand new objects. and like β do NOT just build objects like this, bestie, that's not the move:
$term = GO::Model::Term->new($h);
instead, the iconique way to do it is this:
$fac = GO::ObjFactory->new();
$term = $fac->create_term_obj($h);
and here's the part that's giving convenience π β usually you don't even need to instantiate a factory yourself, because every object made with a factory carries around a reference to that factory. so you can literally just do:
# $graph object was previously created via a factory
$term = $graph->create_term_obj($h);
now, real talk: if you're only using the go-perl module, factories don't really buy you much β it's giving "eh". BUT if you're also using go-db-perl and GO::AppHandle, then factories can be genuinely useful, because all objects generated from the database get attached to an AppHandle, which means "lazy loading" can be used. so slay. β¨ See GO::AppHandle in go-db-perl for the details.
π create_term_obj
- Usage β
$term = $apph->create_term_obj; - Returns β
L<GO::Model::Term> - Args β (empty, nothing to see here π«Ά)
π create_relationship_obj
- Usage β
$relationship = $apph->create_relationship_obj; - Returns β
L<GO::Model::Relationship> - Args β (empty!)
π create_xref_obj
- Usage β
$xref = $apph->create_xref_obj; - Returns β
L<GO::Model::Xref> - Args β (empty!)
π create_evidence_obj
- Usage β
$evidence = $apph->create_evidence_obj; - Returns β
L<GO::Model::Evidence> - Args β (empty!)
π create_seq_obj
- Usage β
$seq = $apph->create_seq_obj; - Returns β
L<GO::Model::Seq> - Args β (empty!)
π create_db_obj
- Usage β
$db = $apph->create_db_obj; - Returns β
L<GO::Model::DB> - Args β (empty!)
π create_association_obj
- Usage β
$association = $apph->create_association_obj; - Returns β
L<GO::Model::Association> - Args β (empty!)
π create_gene_product_obj
- Usage β
$gene_product = $apph->create_gene_product_obj; - Synonym β
create_product_obj - Returns β
L<GO::Model::GeneProduct> - Args β (empty!)
π create_species_obj
- Usage β
$species = $apph->create_species_obj; - Returns β
L<GO::Model::Species> - Args β (empty!)
π create_graph_obj
- Usage β
$graph = $apph->create_graph_obj; - Returns β
L<GO::Model::Graph> - Args β (empty!)
and that's the whole page, periodt π this was written for perl v5.36.0, dated 2023-12-18, and it's GO::ObjFactory(3pm). go make some objects (through a factory, obviously, not directly, i said what i said π) β bye bestie, ily π«Άβ¨π
π¦ 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