HTTP::...:Record(3pm)

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

πŸ’– 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 new HTTP::OAI::Record object. 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 an HTTP::OAI::Header object πŸŽ€
  • $r->metadata([HTTP::OAI::Metadata]) β€” returns and optionally sets the record metadata, which is an HTTP::OAI::Metadata object πŸ’–
  • $r->about([HTTP::OAI::Metadata]) β€” optionally adds a new About record (yep, an HTTP::OAI::Metadata object) 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' or undef β€” 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