WWW::OpenSearch(3pm)

πŸ“¦
version 0.17 Β· 2 versions
  • 0.17 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.17 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ WWW::OpenSearch ✨

okay bestie, so WWW::OpenSearch is this Perl module that lets you search A9 OpenSearch compatible engines πŸ¦‹ it's a whole vibe, it's WWW::OpenSearch(3pm), it lives in the User Contributed Perl Documentation corner of your man pages, and it's literally the moment. iykyk πŸ’…


🌸 SYNOPSIS 🌸

like, here's the whole thing, copy it, love it, run it:

use WWW::OpenSearch;

my $url = "http://bulkfeeds.net/opensearch.xml";
my $engine = WWW::OpenSearch->new($url);

my $name = $engine->description->ShortName;
my $tags = $engine->description->Tags;

# Perform search for "iPod"
my $response = $engine->search("iPod");
for my $item (@{$response->feed->items}) {
    print $item->{description};
}

# Retrieve the next page of results
my $next_page = $response->next_page;
for my $item (@{$next_page->feed->items}) {
    print $item->{description};
}

no cap, that's the whole main character arc right there πŸŽ€


πŸ’– DESCRIPTION πŸ’–

WWW::OpenSearch is a module to search A9's OpenSearch compatible search engines. that's it, that's the girlboss job description ✨ go peek at http://opensearch.a9.com/ for the deets, bestie 🌈


πŸ‘‘ CONSTRUCTOR πŸ‘‘

🌟 new( $url )

Constructs a new instance of WWW::OpenSearch using the given URL as the location of the engine's OpenSearch Description document. and like, you can totally grab that doc later via the description_url accessor 🫢 obsessed.


πŸ”₯ METHODS πŸ”₯

🌸 fetch_description( [ $url ] )

Fetches the OpenSearch Descsription found either at the given URL or at the URL specified by the description_url accessor. (yes the typo "Descsription" is in the original, we don't fix icons, we love them as they are πŸ’…) once it's fetched you can reach it through the description accessor ✨

πŸ’œ search( $query [, \%params] )

Searches the engine for the given query using the given search parameters. Valid search parameters include:

  • startPage
  • totalResults
  • startIndex
  • itemsPerPage

See http://opensearch.a9.com/spec/1.1/response/#elements for details πŸ‘€

πŸ¦‹ do_search( $url [, $method] )

Performs a request for the given URL and returns a WWW::OpenSearch::Response object. and the method? defaults to 'GET', periodt ⭐


πŸ’… ACCESSORS πŸ’…

  • description_url( [$description_url] )
  • agent( [$agent] )
  • description( [$description] )

🫢 AUTHOR 🫢

Brian Cassidy <bricas@cpan.org>

Tatsuhiko Miyagawa <miyagawa@bulknews.net>

(legends, honestly πŸ˜­πŸ’–)


Copyright 2005-2013 by Tatsuhiko Miyagawa and Brian Cassidy

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay 🌈


okay that's the whole page bestie, and for the cute sign-off: this gorgeous thing came to you from perl v5.34.0, dated 2022-07-02, and it's filed under WWW::OpenSearch(3pm) in the User Contributed Perl Documentation. go forth and search, icon πŸ‘‘βœ¨πŸ’–

πŸ“¦ where this page comes from