HTTP::...ifiers(3pm)
π HTTP::OAI::ListIdentifiers β the whole vibe π
okay so bestie, you're holding the manual page for HTTP::OAI::ListIdentifiers, which is part of the User Contributed Perl Documentation (aka the perl peeps made this one, not the core crew, and honestly? iconic of them π«Ά). It's your lil gateway to an OAI ListIdentifiers response, and it's giving very much "let me hand you the receipts, one record at a time." β¨
πΈ NAME πΈ
HTTP::OAI::ListIdentifiers β provides access to an OAI ListIdentifiers response. that's it, that's the job, no cap π
π¦ SYNOPSIS π¦
my $r = $h->ListIdentifiers;
while(my $rec = $r->next) {
print "identifier => ", $rec->identifier, "\n",
print "datestamp => ", $rec->datestamp, "\n" if $rec->datestamp;
print "status => ", ($rec->status || 'undef'), "\n";
}
die $r->message if $r->is_error;
yes bestie, that loop is the whole mood β grab a record, spill its identifier, optionally its datestamp, print the status (or 'undef' if there's nothing there, we don't lie in this house), and then yeet out with die $r->message if $r->is_error says something went wrong. π
π METHODS π
π $li = new OAI::ListIdentifiers
This constructor method returns a new OAI::ListIdentifiers object. Fresh object, fresh start, main character energy only. β¨
π $rec = $li->next
Returns either an HTTP::OAI::Header object, or undef, if there are no more records. Use $rec->is_error to test whether there was an error getting the next record (otherwise things will break). Like, genuinely break bestie, don't skip the vibe check π
If -resume was set to false in the Harvest Agent, next may return a string (the resumptionToken). So heads up: it's not always a Header, sometimes it's just a lil string token sliding through. π
π @il = $li->identifier([$idobj])
Returns the identifier list and optionally adds an identifier or resumptionToken, $idobj. Returns an array ref of HTTP::OAI::Headers. Look at you, getting a whole array ref of headers, obsessed. π
π $dom = $li->toDOM
Returns a XML::DOM object representing the ListIdentifiers response. DOM time, no notes. π₯
π $token = $li->resumptionToken([$token])
Returns and optionally sets the HTTP::OAI::ResumptionToken. Get it, set it, slay. π
ngl bestie, the one thing you truly cannot skip: always check$rec->is_errorafternext, because the docs literally say things will break otherwise and we do not want that for you. π
and that's a wrap on the tea β β this lil page is from perl v5.36.0, dated 2023-09-28, so she's got a lil vintage moment going on but she still eats. bye bestie, go parse some records ππΈβ¨
π¦ 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