HTTP::...:Record(3pm)
π NAME π
HTTP::OAI::Record β okay so this lil babe encapsulates an OAI record β¨ like it's literally the whole record in one cute object, no cap π
πΈ SYNOPSIS πΈ
use HTTP::OAI::Record;
# Create a new HTTP::OAI Record
my $r = new HTTP::OAI::Record();
$r->header->identifier('oai:myarchive.org:oid-233');
$r->header->datestamp('2002-04-01');
$r->header->setSpec('all:novels');
$r->header->setSpec('all:books');
$r->metadata(new HTTP::OAI::Metadata(dom=>$md));
$r->about(new HTTP::OAI::Metadata(dom=>$ab));
the way you just build a whole record in like six lines?? iconic π
β¨ METHODS β¨
$r = new HTTP::OAI::Record( %opts )β this constructor method returns a newHTTP::OAI::Recordobject. brand new, fresh out the box, main character energy π
Options (peep the methods below for the deets):
header => $header
metadata => $metadata
about => [$about]
$r->header([HTTP::OAI::Header])β returns and optionally sets the record header. it's giving anHTTP::OAI::Headerobject π$r->metadata([HTTP::OAI::Metadata])β returns and optionally sets the record metadata, which is anHTTP::OAI::Metadataobject π$r->about([HTTP::OAI::Metadata])β optionally adds a new About record (yep, anHTTP::OAI::Metadataobject) and returns an array of objects. heads up bestie: that array may be empty π
π¦ Header Accessor Methods π¦
okay so these methods are literally equivalent to $rec->header->$method([$value]) β same vibe, shorter typing, we love a shortcut π
$r->identifier([$identifier])β get and optionally set the record OAI identifier β¨$r->datestamp([$datestamp])β get and optionally set the record datestamp ποΈ$r->status([$status])β get and optionally set the record status. valid values are'deleted'orundefβ that's it, that's the whole list, no extras πΈ$r->is_deleted()β returns whether this record's status is deleted. true/false moment π
ngl this whole thing is lowkey just a wrapper with a header, some metadata and an about, but it ate fr fr π«Ά
that's the page, bestie!! go build some records, you got this πβπ
β written for perl v5.36.0, dated 2023-09-28, and yeah it's User Contributed Perl Documentation, we stay humble π
π¦ 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