![]() |
![]()
| ![]() |
![]()
NAMEWWW::SearchResult - class for results returned from WWW::Search SYNOPSISrequire WWW::Search; require WWW::SearchResult; $search = new WWW::Search; $search->native_query(WWW::Search::escape_query($query)); # Get first result: $result = $search->next_result(); DESCRIPTIONA framework for returning the results of "WWW::Search". SEE ALSOWWW::Search REQUIRED RESULTSThe particular fields returned in a result are backend- (search engine-) dependent. However, all search engines are required to return a url and title. (This list may grow in the future.) METHODS AND FUNCTIONSnewTo create a new WWW::SearchResult, call $result = new WWW::SearchResult(); urlReturns 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 is the first one returned by the back end. Every result is required to have at least one URL. add_urlAdd a URL to the list. urlsReturn a reference to the list of urls. There is also a primary URL ("url"). add_related_urlAdd a URL to the related_url list. related_urlsReturn a reference to the list of related urls. add_related_titleAdd a title to the list or related titles. related_titlesReturn a reference to the list of related titles. title, description, score, change_date, index_date, size, rawSet or get attributes of the result. None of these attributes is guaranteed to be provided by a given backend. If an attribute is not provided its method will return "undef". Typical contents of these attributes:
OthersMore attributes of the result. Backend-specific. Refer to the documentation of each backend for details. AUTHORWWW::SearchResult was written by John Heidemann. WWW::SearchResult is maintained by Martin Thurn.
|