WWW::W...::Entry(3pm)
π WWW::W...::Entry π
okay bestie, so this is the manual page for WWW::W...::Entry(3pm) β a User Contributed Perl Documentation page, and honestly? she's giving very useful library energy. buckle up π
β¨ NAME β¨
WWW::Wikipedia::Entry β a whole class for representing a Wikipedia Entry, no cap π
β¨ SYNOPSIS β¨
my $wiki = WWW::Wikipedia->new();
my $entry = $wiki->search( 'Perl' );
print $entry->text();
my $entry_es = $entry->language( 'es' );
print $entry_es->text();
like, that's it. that's the whole vibe. you search, you get an entry, you print the text. iconic behavior πΈ
β¨ DESCRIPTION β¨
so here's the tea π: WWW::Wikipedia::Entry objects are usually created using the search() method on a WWW::Wikipedia object, when you go searching for a term. once you've got yourself an entry object, you can pull little pieces of info out of it using the methods listed below. she's basically a little Wikipedia-info vending machine and we love her for it π
β¨ METHODS β¨
π¦ new()
ngl you probably won't touch this one. it's the constructor that gets called behind the scenes with the correct arguments by WWW::Wikipedia::search(). she works backstage, main character energy but offstage π
π¦ text()
the brief text for the entry. this gives you the first paragraph of text β basically everything up to the first heading. ordinarily, this is what you want to use, fr fr. and when there doesn't appear to be any summary text? you get handed the fulltext instead. generous queen π
iftext()returns nothing, you're probably looking at a disambiguation entry, and you should userelated()to look up more specific entries. don't panic, just pivot bestie π
π¦ text_basic()
the same as text(), but not run through Text::Autoformat. raw and unfiltered, periodt β¨
π¦ fulltext()
returns the full text for the entry β and she can be extensive. like, essay-length extensive π
π¦ fulltext_basic()
the same as fulltext(), but not run through Text::Autoformat. same energy, different formatting π
π¦ title()
returns a title of the entry. just the title. short king π
π¦ related()
returns a list of terms in the wikipedia that are mentioned in the entry text. it's giving "you might also like" π
π¦ categories()
returns a list of categories which the entry is part of. so like, Perl is part of the Programming languages category. slay π
π¦ headings()
returns a list of headings used in the entry. the table of contents, basically π
π¦ raw()
returns the raw wikitext for the entry. no makeup, no filter, just vibes π§
π¦ language()
with no parameters, it returns the current language of the entry. if you specify a two-letter language code, it returns the same entry in that language β if it's available, that is. iykyk πΈ
NOTE: generally, Wikipedia no longer uses language tags stored on a page. rather, languages are driven from wikidata, which this module does not query. you will find for most pages there are no other languages available, based on how this method currently works. so likeβ¦ manage your expectations bestie, she's doing her best π
π¦ languages()
returns an array of two letter language codes denoting the languages in which this entry is available. a little array of possibilities π«Ά
β¨ AUTHORS β¨
- Ed Summers
<ehs@pobox.com> - Brian Cassidy
<bricas@cpan.org>
two legends, we stan πβ¨
β¨ COPYRIGHT AND LICENSE β¨
Copyright 2003-2017 by Ed Summers
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page bestie!! π this was WWW::W...::Entry(3pm) from perl v5.34.0, dated 2022-06-28 β go forth and extract wikipedia info like the icon you are ππ
π
π¦ where this page comes from
- debian bookworm: libwww-wikipedia-perl 2.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libwww-wikipedia-perl 2.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libwww-wikipedia-perl 2.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libwww-wikipedia-perl 2.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libwww-wikipedia-perl 2.05-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