WWW::SearchResult - class for results returned from WWW::Search
require WWW::Search; require WWW::SearchResult; $search = new WWW::Search; $search->native_query(WWW::Search::escape_query($query)); # get first result $result = $search->next_result();
A framework for returning the results of WWW::Search.
WWW::Search
To create a new WWW::SearchResult, call $search = new WWW::SearchResult();
Return the primary URL. Note that there may be a list of urls, see also methods urls and add_url. Nothing special is guaranteed about the primary URL other than that it's the first one returned by the back end.
urls
add_url
Every result is required to have at least one URL.
Return a reference to an array of urls. There is also a primary URL (url). See also add_url.
url
Add a URL to the list.
Analgous to urls, these functions provide lists of related URLs and their titles. These point to things the search engine thinks you might want (for example, see Infoseek).
Set or get attributes of the result.
None of these attributes is guaranteed to be provided by a given back-end. If an attribute is not provided its method will return undef.
undef
Typical contents of these attributes:
1 POD Error
The following errors were encountered while parsing the POD:
=over should be: '=over' or '=over positive_number'
To install WWW::Search, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Search
CPAN shell
perl -MCPAN -e shell install WWW::Search
For more information on module installation, please visit the detailed CPAN module installation guide.