WWW::O...iption(3pm)
π NAME π
WWW::OpenSearch::Description β bestie, it literally wraps up an OpenSearch Description that some A9 OpenSearch compatible engine handed you, and keeps it all cozy in one little object. π
β¨ SYNOPSIS β¨
okay so here's the whole vibe in code, no cap:
use WWW::OpenSearch;
my $url = "http://bulkfeeds.net/opensearch.xml";
my $engine = WWW::OpenSearch->new($url);
my $description = $engine->description;
my $format = $description->Format; # or $description->format
my $longname = $description->LongName; # or $description->longname
see how we just grab the description off the engine and then poke at it? that's it, that's the whole thing, slay. π
πΈ DESCRIPTION πΈ
WWW::OpenSearch::Description is the module whose entire job is to encapsulate an OpenSearch Description provided by an A9 OpenSearch compatible engine. that's its main character moment fr fr.
wanna know the actual spec details? go look at http://opensearch.a9.com/spec/1.1/description/ β the source of truth, periodt. π
π¦ CONSTRUCTOR π¦
π§ new( [ $xml ] )
makes you a shiny new instance of WWW::OpenSearch::Description. and if you actually pass in that scalar parameter $xml? then the data just auto-loads itself from it using load( $xml ). effortless. iconic. β¨
π METHODS π
π load( $xml )
loads up your description data by parsing whatever you passed in, using XML::LibXML. it's giving parser energy. π₯
π urls( )
returns all of the urls tied to this description, as an array. every single one, no crumbs left behind.
β get_best_url( )
tries to fetch the best URL for this description, and "best" here means by content type, ranked from most preferred to least preferred:
application/atom+xmlapplication/rss+xmltext/xml
so it's literally a ranking, top of the list is the fave. π
π get_url_by_type( $type )
grabs the first WWW::OpenSearch::URL attached to this description whose type matches $type. first come, first served, iykyk.
π ACCESSORS π
here's the full roster, every single one, no skips bestie:
version( )ns( )AdultContent( )Attribution( )Contact( )Description( )Developer( )Format( )InputEncoding( )Image( )Language( )LongName( )OutputEncoding( )Query( )SampleSearch( )ShortName( )SyndicationRight( )Tags( )Url( )
that's nineteen accessors, count 'em. π«Ά
π AUTHOR π
the legends behind this, we stan:
- Tatsuhiko Miyagawa
<miyagawa@bulknews.net> - Brian Cassidy
<bricas@cpan.org>
π COPYRIGHT AND LICENSE π
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.
fr fr, same terms as Perl itself β that's the whole deal, no fine print surprise. π
and that's a wrap, bestie!! π«Ά this page came to you from perl v5.34.0, dated 2022-07-02, in the WWW::OpenSearch::Description(3pm) era β go forth and parse those descriptions, you absolute icon. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libwww-opensearch-perl 0.17-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libwww-opensearch-perl 0.17-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libwww-opensearch-perl 0.17-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libwww-opensearch-perl 0.17-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libwww-opensearch-perl 0.17-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms