HTTP::...istSets(3pm)
π NAME π
HTTP::OAI::ListSets β bestie, this is your golden ticket to an OAI ListSets response. That's it. That's the whole vibe. β¨
πΈ SYNOPSIS πΈ
okay so here's the whole flow, and honestly? it's giving effortless:
my $r = $h->ListSets();
while( my $rec = $r->next ) {
print $rec->setSpec, "\n";
}
die $r->message if $r->is_error;
like. look at it. looping through records, printing the setSpec, and then dying dramatically if anything went wrong. main character behaviour fr fr. π
π¦ METHODS π¦
$ls = new HTTP::OAI::ListSetsβ this constructor method hands you back a brand newOAI::ListSetsobject. yes, that's the whole job, and it ate. π$set = $ls->nextβ gives you either anHTTP::OAI::Setobject, orundefif there are literally no more records left to hand out. you wanna know if something went sideways while grabbing the next record? test it with$set->is_error. π
heads up bestie: if-resumewas set to false in the Harvest Agent,nextmight come back with a string instead β and that string is theresumptionToken. not a Set object, a string. iykyk. π
@setl = $ls->set([$set])β returns the set list, and optionally adds a new set orresumptionToken,$set. what you get back is an array ref ofHTTP::OAI::Sets, with an optionalresumptionTokenstring riding along. π$token = $ls->resumptionToken([$token])β returns theHTTP::OAI::ResumptionToken, and optionally sets it too. two jobs, zero complaints, iconic. β¨$dom = $ls->toDOMβ returns anXML::DOMobject that represents the ListSets response. look at your little structured tree go. π
π«Ά SIGN-OFF π«Ά
this page was brought to you by perl v5.36.0, dated 2023-09-28, and it's filed under HTTP::...istSets(3pm) in the User Contributed Perl Documentation. go forth and harvest those sets, bestie β no cap, you've got this. ππ¦πΈ
π¦ where this page comes from
- debian trixie: libhttp-oai-perl 4.13-1 Β· BSD-3-Clause
- ubuntu noble: libhttp-oai-perl 4.13-1 Β· BSD-3-Clause
- ubuntu resolute: libhttp-oai-perl 4.13-1 Β· BSD-3-Clause
- ubuntu stonking: libhttp-oai-perl 4.13-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms