HTTP::...:OAI_DC(3pm)

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

✨ NAME ✨

HTTP::OAI::Metadata::OAI_DC β€” bestie, it's your easy-access pass to OAI Dublin Core πŸ’… (this is a page from the User Contributed Perl Documentation, so you know it's the people's manual, periodt)


🌸 DESCRIPTION 🌸

okay so HTTP::OAI::Metadata::OAI_DC gives you a simple interface for two things and two things only, no cap:

  • parsing OAI Dublin Core 🧚
  • generating OAI Dublin Core 🧚

and we're talking about the flavour literally named oai_dc β€” that's the one. the moment you've been waiting for. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole vibe, copy it exactly bestie, character for character:

use HTTP::OAI::Metadata::OAI_DC;

my $md = new HTTP::OAI::Metadata(
    dc=>{title=>['Hello, World!','Hi, World!']},
);

# Prints "Hello, World!"
print $md->dc->{title}->[0], "\n";

my $xml = $md->metadata();

$md->metadata($xml);

so like, you build the metadata object with a dc hashref of arrays, you reach in and grab $md->dc->{title}->[0] and it literally prints Hello, World! 🌈. then $md->metadata() hands you back the XML, and $md->metadata($xml) feeds XML right back in. icon behavior fr fr πŸ’–


πŸ‘‘ NOTE πŸ‘‘

heads up bestie, this is important: HTTP::OAI::Metadata::OAI_DC will automatically β€” and silently 😭 β€” convert OAI version 1.x oai_dc records into OAI version 2.0 oai_dc records. it does not ask. it does not tell you. it just does it. that's the main character energy we're dealing with πŸ’€βœ¨

kisses, this page is from perl v5.36.0, dated 2023-09-28, and it lives under HTTP::...:OAI_DC(3pm) β€” go slay your metadata, ily πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from