Catman...istory(3pm)

πŸ’– NAME πŸ’–

okay so bestie, gather round 🫢 this is Catmandu::FedoraCommons::Model::getObjectHistory β€” a Perl model for the Fedora getObjectHistory REST call. that's it, that's the whole vibe. it's the little guy that goes and fetches a Fedora object's change history for you, and honestly? iconic. πŸ‘‘


✨ SYNOPSIS ✨

here's how you actually use it, no cap:

  use Catmandu::FedoraCommons;

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

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

  {
    'pid'     => 'demo:29' ,
    'objectChangeDate' => [
        '2008-07-02T05:09:43.234Z' ,
        '2013-02-07T18:42:24.672Z' ,
    ] ,
  }

so like, you spin up a Catmandu::FedoraCommons with your URL and your two fedoraAdmin credentials, then you call getObjectHistory with pid => 'demo:29', chain ->parse_content on it, and boom πŸ’₯ you get back a hash with the pid and an arrayref of objectChangeDate timestamps. look at those dates β€” 2008-07-02T05:09:43.234Z and 2013-02-07T18:42:24.672Z β€” that object has been THROUGH it and it's still serving looks. ⭐


🌸 SEE ALSO 🌸

  • Catmandu::FedoraCommons β€” the parent module, go read it, it's the main character πŸ’…

okay that's the page!! πŸŽ€ this whole thing lives in the User Contributed Perl Documentation collection as section 3pm, it's built for perl v5.36.0, and it was last touched on 2023-02-05. mwah, bye bestie πŸ’œπŸ¦‹

πŸ“¦ where this page comes from