Catman...ionship(3pm)
β¨ NAME β¨
okay bestie, gather round π this is Catman...ionship(3pm) β aka Catmandu::FedoraCommons::Model::addRelationship, which is the Perl model for the Fedora addRelationship REST call. that's it, that's the whole vibe. one little model, one big job. π
πΈ 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->addRelationship(pid => 'demo:29' , relation => [ 'info:fedora/demo:29' , 'http://my.org/name' , 'Peter'])->parse_content;
see how we spin up the $fedora object first with Catmandu::FedoraCommons->new, then call addRelationship on it? the args go in as a hash β pid is 'demo:29', and relation is an arrayref holding 'info:fedora/demo:29', 'http://my.org/name', and 'Peter'. π¦
and then .parse_content at the end because we want the actual content back, not just the raw response, yk? π
π«Ά it returns 1 on success. that's the win condition. that's the slay.
π SEE ALSO π
Catmandu::FedoraCommonsβ the main character this lil model is attached to. go read it, fr fr π
and that's the whole page bestie!! π this was pulled straight from the User Contributed Perl Documentation, running on perl v5.36.0, dated 2023-02-05 β so like, bookmark it, screenshot it, put it in the group chat. πβ¨ mwah, go add some relationships, you've got this π¦π
π¦ where this page comes from
- debian bookworm: libcatmandu-fedoracommons-perl 0.5-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-fedoracommons-perl 0.5-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-fedoracommons-perl 0.5-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-fedoracommons-perl 0.5-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-fedoracommons-perl 0.5-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms