2 WWW::OpenSearch - Search A9 OpenSearch compatible engines
\r
7 my $url = "http://bulkfeeds.net/opensearch.xml";
\r
8 my $engine = WWW::OpenSearch->new($url);
\r
10 my $name = $engine->description->ShortName;
\r
11 my $tags = $engine->description->Tags;
\r
13 # Perform search for "iPod"
\r
14 my $response = $engine->search("iPod");
\r
15 for my $item (@{$response->feed->items}) {
\r
16 print $item->{description};
\r
19 # Retrieve the next page of results
\r
20 my $next_page = $response->next_page;
\r
21 for my $item (@{$next_page->feed->items}) {
\r
22 print $item->{description};
\r
26 WWW::OpenSearch is a module to search A9's OpenSearch compatible search
\r
27 engines. See http://opensearch.a9.com/ for details.
\r
31 Constructs a new instance of WWW::OpenSearch using the given URL as the
\r
32 location of the engine's OpenSearch Description document (retrievable
\r
33 via the description_url accessor).
\r
36 fetch_description( [ $url ] )
\r
37 Fetches the OpenSearch Descsription found either at the given URL or at
\r
38 the URL specified by the description_url accessor. Fetched description
\r
39 may be accessed via the description accessor.
\r
41 search( $query [, \%params] )
\r
42 Searches the engine for the given query using the given search
\r
43 parameters. Valid search parameters include:
\r
50 See http://opensearch.a9.com/spec/1.1/response/#elements for details.
\r
52 do_search( $url [, $method] )
\r
53 Performs a request for the given URL and returns a
\r
54 WWW::OpenSearch::Response object. Method defaults to 'GET'.
\r
57 description_url( [$description_url] )
\r
59 description( [$description] )
\r
61 * Tatsuhiko Miyagawa <miyagawa@bulknews.net>
\r
62 * Brian Cassidy <bricas@cpan.org>
\r
64 COPYRIGHT AND LICENSE
\r
65 Copyright 2006 by Tatsuhiko Miyagawa and Brian Cassidy
\r
67 This library is free software; you can redistribute it and/or modify it
\r
68 under the same terms as Perl itself.
\r