MediaW...t::link(3pm)

πŸ“¦
version 0.2.2 Β· 2 versions
  • 0.2.2 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.2.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Parse::MediaWikiDump::link β€” bestie, it's an object that represents a link from one article to another πŸ¦‹βœ¨

So real quick, the manual name situation: this lives in section 3pm of the Perl docs, filed under "User Contributed Perl Documentation" because a lovely human contributed it, and we're all obsessed with that for them πŸ’…


🌸 ABOUT 🌸

Okay so picture this: you've got a MediaWiki instance, right? Articles linking to other articles, chaos, drama, lore. This object is your little backstage pass πŸŽ€ β€” it gives you access to the data tied to each individual link between articles. One link, one object. Very main character of it, honestly.


✨ METHODS ✨

  • $link->from β€” hands you the article id that the link starts from. Not the name, bestie, the id. That's it, that's the whole vibe πŸ’œ
  • $link->namespace β€” gives you the namespace id that the link points to. Again: id, not the name. Don't come for me, I'm just the messenger 🫢
  • $link->to β€” this one returns the article title that the link points to β€” and no, it is not the id, and it does not include the namespace. Title only, periodt πŸ‘‘
ngl the pattern here is iconic: from and namespace are ids, to is a title. Keep that straight and you're slaying πŸ”₯

That's genuinely the whole page, she's short and she's perfect 😭

Bye bestie, go parse some links πŸ’– This was perl v5.34.0, dated 2022-06-15, from your favorite MediaW...t::link(3pm) era. Mwah πŸŒˆβ­πŸŽ€

πŸ“¦ where this page comes from