HTTP::...Record(3pm)

πŸ“¦
version 4.13 Β· 5 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– HTTP::...Record(3pm) πŸ’–

ok so bestie, welcome to the User Contributed Perl Documentation page for HTTP::...Record(3pm) β€” yes the title looks like it got cut off mid-sentence, that's just how the header renders it, we move on ✨


✨ NAME ✨

HTTP::OAI::GetRecord β€” an OAI GetRecord response πŸŽ€


🌸 DESCRIPTION 🌸

so HTTP::OAI::GetRecord is derived from HTTP::OAI::Response, which means it inherits all the good stuff and then gives you more. specifically, it gives you access to the data chillin' inside an OAI GetRecord response, on top of the header information that OAI::Response already hands you. it's giving ✨layered✨, it's giving inheritance done right πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

ok here's the vibe, literally copy this:

use HTTP::OAI::GetRecord();

$res = new HTTP::OAI::GetRecord();
$res->record($rec);

that's it. that's the whole entry point. iconic 🫢


πŸ‘‘ METHODS πŸ‘‘

🌈 $gr = new HTTP::OAI::GetRecord

this is the constructor, bestie. it returns a brand new HTTP::OAI::GetRecord object, fresh out the box, zero notes πŸŽ€

πŸ“ $rec = $gr->next

hands you the next record stored in the response. if there are no more records available it returns undef β€” so like, no drama, just undef, check for it πŸ™ˆ

the record comes back as an OAI::Record.

πŸ’œ @recs = $gr->record([$rec])

returns the record list, and if you pass it a record it'll optionally add that record to the end of the queue.

⚠️ heads up though: GetRecord only stores one record at a time, so if you call this method with argument(s) it will replace any existing record. one in, one out, no hoarding πŸ’€

✨ $dom = $gr->toDOM()

returns an XML::DOM object representing the GetRecord response. boom, DOM'd, slay πŸ”₯


🌸 sign-off 🌸

and that's the whole page, bestie!! this was perl v5.36.0, dated 2023-09-28, and the manual is HTTP::...Record(3pm) β€” go forth and GetRecord responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from