GO::ObjFactory(3pm)

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

πŸ’– 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