SWISS::Stars(3pm)

πŸ“¦
version 1.80 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– NAME πŸ’–

okay bestie, today's main character is SWISS::Stars.pm β€” and the page we're vibing on is the one and only SWISS::Stars(3pm), straight out of the User Contributed Perl Documentation πŸ’…βœ¨


🌸 DESCRIPTION 🌸

so SWISS::Stars is the class that represents the ** lines inside an SWISS-PROT + TrEMBL entry 🧬. these are the lines tagged ** that are, like, normally not publicly visible β€” secret little lines, iykyk πŸ™ˆ

SWISS::Stars is a master object in the same way SWISS::Entry is πŸ‘‘. it holds subobjects, and those subobjects represent the different line types in the ** section. every line type gets its own two letter tag on top of the ** line tag. and the whole reason this module exists? so that adding brand-new ** line types is lowkey effortless πŸ’–. to use a new ** line tag, you just dereference it with that tag as the object. example incoming:

$entry->Stars->XX->add("New XX tag line.","Second new XX tag line.");

now here's the tea β˜• β€” if there is no class SWISS::Stars::XX, the class of your new object will be SWISS::Stars::default, and that default class handles lines with the matching tag as an array of lines. if you need something more specific than that, you can create your own class SWISS::Stars::XX by following the template of SWISS::Stars::default. there's a whole example of this already: SWISS::Stars::aa πŸŽ€

⚠️ important bestie, don't skip this: subclass names and new line tags have to be two-letter-tags. and no checks are made whether the tag you dereferenced is actually allowed. so like, it'll just let you do it. be normal about that 😭

access to the (old) unstructured ANNOTATOR'S SECTION is provided by the line tag 'aa':

$entry->Stars->aa->add("Testline 1.","Second new test line.");

and that right there will add those two lines into the ANNOTATOR'S SECTION 🫢


πŸ¦‹ Inherits from πŸ¦‹

SWISS::BaseClass.pm β€” yeah she's got family, we love an inheritance moment πŸ‘‘


⭐ Attributes ⭐

  • no public attributes apart from the subclasses πŸ’€ that's it, that's the whole attribute list, we stay unbothered

🌈 Methods 🌈

✨ Standard methods ✨

the classics, the icons, the ones you already know and love:

  • new
  • fromText
  • toText
  • update

and that's the whole page, bestie, you ate it πŸ“πŸ’… this was SWISS::Stars(3pm) from perl v5.32.1, dated 2021-08-15 β€” go forth and dereference responsibly, periodt πŸ‘‘βœ¨

πŸ“¦ where this page comes from