README
1NAME
2 WWW::OpenSearch - Search A9 OpenSearch compatible engines
3
4SYNOPSIS
5 use WWW::OpenSearch;
6
7 my $url = "http://bulkfeeds.net/opensearch.xml";
8 my $engine = WWW::OpenSearch->new($url);
9
10 my $name = $engine->description->ShortName;
11 my $tags = $engine->description->Tags;
12
13 # Perform search for "iPod"
14 my $response = $engine->search("iPod");
15 for my $item (@{$response->feed->items}) {
16 print $item->{description};
17 }
18
19 # Retrieve the next page of results
20 my $next_page = $response->next_page;
21 for my $item (@{$next_page->feed->items}) {
22 print $item->{description};
23 }
24
25DESCRIPTION
26 WWW::OpenSearch is a module to search A9's OpenSearch compatible search
27 engines. See http://opensearch.a9.com/ for details.
28
29CONSTRUCTOR
30 new( $url )
31 Constructs a new instance of WWW::OpenSearch using the given URL as the
32 location of the engine's OpenSearch Description document (retrievable
33 via the description_url accessor).
34
35METHODS
36 fetch_description( [ $url ] )
37 Fetches the OpenSearch Descsription found either at the given URL or at
38 the URL specified by the description_url accessor. Fetched description
39 may be accessed via the description accessor.
40
41 search( $query [, \%params] )
42 Searches the engine for the given query using the given search
43 parameters. Valid search parameters include:
44
45 * startPage
46
47 * totalResults
48
49 * startIndex
50
51 * itemsPerPage
52
53 See http://opensearch.a9.com/spec/1.1/response/#elements for details.
54
55 do_search( $url [, $method] )
56 Performs a request for the given URL and returns a
57 WWW::OpenSearch::Response object. Method defaults to 'GET'.
58
59ACCESSORS
60 description_url( [$description_url] )
61 agent( [$agent] )
62 description( [$description] )
63AUTHOR
64 Brian Cassidy <bricas@cpan.org>
65
66 Tatsuhiko Miyagawa <miyagawa@bulknews.net>
67
68COPYRIGHT AND LICENSE
69 Copyright 2005-2013 by Tatsuhiko Miyagawa and Brian Cassidy
70
71 This library is free software; you can redistribute it and/or modify it
72 under the same terms as Perl itself.
73
74