Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

www::wikipedia::entry(3pm) [debian man page]

WWW::Wikipedia::Entry(3pm)				User Contributed Perl Documentation				WWW::Wikipedia::Entry(3pm)

NAME
WWW::Wikipedia::Entry - A class for representing a Wikipedia Entry SYNOPSIS
my $wiki = WWW::Wikipedia->new(); my $entry = $wiki->search( 'Perl' ); print $entry->text(); my $entry_es = $entry->language( 'es' ); print $entry_es->text(); DESCRIPTION
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. METHODS
new() 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(). text() 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. text_basic() The same as "text()", but not run through Text::Autoformat. fulltext() Returns the full text for the entry, which can be extensive. fulltext_basic() The same as "fulltext()", but not run through Text::Autoformat. title() Returns a title of the entry. related() Returns a list of terms in the wikipedia that are mentioned in the entry text. categories() Returns a list of categories which the entry is part of. So Perl is part of the Programming languages category. headings() Returns a list of headings used in the entry. raw() Returns the raw wikitext for the entry. language() 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. languages() Returns an array of two letter language codes denoting the languages in which this entry is available. AUTHORS
Ed Summers <ehs@pobox.com> Brian Cassidy <bricas@cpan.org> COPYRIGHT AND LICENSE
Copyright 2003-2011 by Ed Summers This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2011-02-16 WWW::Wikipedia::Entry(3pm)

Check Out this Related Man Page

XML::Atom::Entry(3pm)					User Contributed Perl Documentation				     XML::Atom::Entry(3pm)

NAME
XML::Atom::Entry - Atom entry SYNOPSIS
use XML::Atom::Entry; my $entry = XML::Atom::Entry->new; $entry->title('My Post'); $entry->content('The content of my post.'); my $xml = $entry->as_xml; my $dc = XML::Atom::Namespace->new(dc => 'http://purl.org/dc/elements/1.1/'); $entry->set($dc, 'subject', 'Food & Drink'); USAGE
XML::Atom::Entry->new([ $stream ]) Creates a new entry object, and if $stream is supplied, fills it with the data specified by $stream. Automatically handles autodiscovery if $stream is a URI (see below). Returns the new XML::Atom::Entry object. On failure, returns "undef". $stream can be any one of the following: o Reference to a scalar This is treated as the XML body of the entry. o Scalar This is treated as the name of a file containing the entry XML. o Filehandle This is treated as an open filehandle from which the entry XML can be read. $entry->content([ $content ]) Returns the content of the entry. If $content is given, sets the content of the entry. Automatically handles all necessary escaping. $entry->author([ $author ]) Returns an XML::Atom::Person object representing the author of the entry, or "undef" if there is no author information present. If $author is supplied, it should be an XML::Atom::Person object representing the author. For example: my $author = XML::Atom::Person->new; $author->name('Foo Bar'); $author->email('foo@bar.com'); $entry->author($author); $entry->link If called in scalar context, returns an XML::Atom::Link object corresponding to the first <link> tag found in the entry. If called in list context, returns a list of XML::Atom::Link objects corresponding to all of the <link> tags found in the entry. $entry->add_link($link) Adds the link $link, which must be an XML::Atom::Link object, to the entry as a new <link> tag. For example: my $link = XML::Atom::Link->new; $link->type('text/html'); $link->rel('alternate'); $link->href('http://www.example.com/2003/12/post.html'); $entry->add_link($link); $entry->get($ns, $element) Given an XML::Atom::Namespace element $ns and an element name $element, retrieves the value for the element in that namespace. This is useful for retrieving the value of elements not in the main Atom namespace, like categories. For example: my $dc = XML::Atom::Namespace->new(dc => 'http://purl.org/dc/elements/1.1/'); my $subj = $entry->get($dc, 'subject'); $entry->getlist($ns, $element) Just like $entry->get, but if there are multiple instances of the element $element in the namespace $ns, returns all of them. get will return only the first. AUTHOR &; COPYRIGHT Please see the XML::Atom manpage for author, copyright, and license information. perl v5.12.4 2009-04-24 XML::Atom::Entry(3pm)
Man Page