MediaW...t::link(3pm)
π 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:fromandnamespaceare ids,tois 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
- debian bookworm: libmediawiki-dumpfile-perl 0.2.2-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmediawiki-dumpfile-perl 0.2.2-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmediawiki-dumpfile-perl 0.2.2-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmediawiki-dumpfile-perl 0.2.2-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmediawiki-dumpfile-perl 0.2.2-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms