Catman...rofile(3pm)

πŸ’… Catmandu::FedoraCommons::Model::getObjectProfile (3pm) πŸ’…

okay so bestie, welcome to Catman...rofile(3pm) β€” yes that's the manual name, it's giving truncated-but-mysterious, we love her πŸŽ€ β€” this page lives in the User Contributed Perl Documentation section, and it's literally all about one tiny slay little thing. sit down, hydrate, let's go πŸ¦‹


✨ NAME ✨

Catmandu::FedoraCommons::Model::getObjectProfile β€” a Perl model for the Fedora getObjectProfile REST call. that's it, that's the whole job, and she does it flawlessly πŸ‘‘


🌸 SYNOPSIS 🌸

okay so here's the vibe. you load the module, you spin up a Catmandu::FedoraCommons object pointing at your fedora, and then you just… ask for the profile. no cap.

  use Catmandu::FedoraCommons;

  my $fedora = Catmandu::FedoraCommons->new('http://localhost:8080/fedora','fedoraAdmin','fedoraAdmin');

  my $obj = $fedora->getObjectProfile(pid => 'demo:29')->parse_content;

and what comes back? THIS. look at her. so many fields, so organized, main character energy fr fr πŸ’–

  {
    'pid'     => 'demo:29' ,
    'objLabel'       => 'Data Object for Image Manipulation Demo' ,
    'objOwnerId'     => 'fedoraAdmin' ,
    'objCreateDate'  => '2008-07-02T05:09:42.015Z' ,
    'objLastModDate' => '2013-02-07T19:57:27.140Z' ,
    'objDissIndexViewURL' => 'http://localhost:8080/fedora/objects/demo%3A29/methods/fedora-system%3A3/viewMethodIndex' ,
    'objItemIndexViewURL' => 'http://localhost:8080/fedora/objects/demo%3A29/methods/fedora-system%3A3/viewItemIndex' ,
    'objState'       => 'I' ,
    'objModels'      => [
        'info:fedora/fedora-system:FedoraObject-3.0' ,
        'info:fedora/demo:UVA_STD_IMAGE' ,
    ],
  }

like… the pid, the objLabel, the objOwnerId, both the dates, both the index view URLs, the objState, and an objModels array with two entries? she ate and left no crumbs πŸ“

ngl the return value is a hashref exactly like the one above β€” parse_content is the one doing that little glow-up ✨

🫢 SEE ALSO 🫢

  • Catmandu::FedoraCommons β€” the parent module, the blueprint, the icon herself πŸ‘‘

that's the whole page bestie, short and sweet and honestly iconic for it 🌈

cute lil sign-off time: this one's from perl v5.36.0, dated 2023-02-05 πŸ’œ go get that object profile, you got this 🧚✨

πŸ“¦ where this page comes from