GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WWW::Wikipedia::Entry(3) User Contributed Perl Documentation WWW::Wikipedia::Entry(3)

WWW::Wikipedia::Entry - A class for representing a Wikipedia Entry

    my $wiki = WWW::Wikipedia->new();
    my $entry = $wiki->search( 'Perl' );
    print $entry->text();

    my $entry_es = $entry->language( 'es' );
    print $entry_es->text();

WWW::Wikipedia::Entry objects are usually created using the search() method on a WWW::Wikipedia object to search for a term. Once you've got an entry object you can then extract pieces of information from the entry using the following methods.

You probably won't use this one, it's the constructor that is called behind the scenes with the correct arguments by WWW::Wikipedia::search().

The brief text for the entry. This will provide the first paragraph of text; basically everything up to the first heading. Ordinarily this will be what you want to use. When there doesn't appear to be summary text you will be returned the fulltext instead.

If text() returns nothing then you probably are looking at a disambiguation entry, and should use related() to lookup more specific entries.

The same as "text()", but not run through Text::Autoformat.

Returns the full text for the entry, which can be extensive.

The same as "fulltext()", but not run through Text::Autoformat.

Returns a title of the entry.

Returns a list of terms in the wikipedia that are mentioned in the entry text.

Returns a list of categories which the entry is part of. So Perl is part of the Programming languages category.

Returns a list of headings used in the entry.

Returns the raw wikitext for the entry.

With no parameters, it will return the current language of the entry. By specifying a two-letter language code, it will return the same entry in that language, if available.

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..

Returns an array of two letter language codes denoting the languages in which this entry is available.

Ed Summers <ehs@pobox.com>

Brian Cassidy <bricas@cpan.org>

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.

2017-05-01 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.