2 WWW::OpenSearch - Search A9 OpenSearch compatible engines
7 my $url = "http://bulkfeeds.net/opensearch.xml";
8 my $engine = WWW::OpenSearch->new($url);
10 my $name = $engine->description->ShortName;
11 my $tags = $engine->description->Tags;
13 # Perform search for "iPod"
14 my $response = $engine->search("iPod");
15 for my $item (@{$response->feed->items}) {
16 print $item->{description};
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};
26 WWW::OpenSearch is a module to search A9's OpenSearch compatible search
27 engines. See http://opensearch.a9.com/ for details.
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).
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.
41 search( $query [, \%params] )
42 Searches the engine for the given query using the given search
43 parameters. Valid search parameters include:
50 See http://opensearch.a9.com/spec/1.1/response/#elements for details.
52 do_search( $url [, $method] )
53 Performs a request for the given URL and returns a
54 WWW::OpenSearch::Response object. Method defaults to 'GET'.
57 description_url( [$description_url] )
59 description( [$description] )
61 * Tatsuhiko Miyagawa <miyagawa@bulknews.net>
62 * Brian Cassidy <bricas@cpan.org>
65 Copyright 2007 by Tatsuhiko Miyagawa and Brian Cassidy
67 This library is free software; you can redistribute it and/or modify it
68 under the same terms as Perl itself.