Catman...lidate(3pm)
πΈ NAME πΈ
okay so Catmandu::FedoraCommons::Model::validate β it's a Perl model that wraps up the Fedora validate REST call, bestie. that's the whole vibe π
This page is from the User Contributed Perl Documentation (the 3pm girlies, you know the ones) β she's Catman...lidate(3pm), no cap.
β¨ SYNOPSIS β¨
here's the whole thing in action, literally:
use Catmandu::FedoraCommons;
my $fedora = Catmandu::FedoraCommons->new('http://localhost:8080/fedora','fedoraAdmin','fedoraAdmin');
my $obj = $fedora->validate(pid => 'demo:29')->parse_content;
{
'pid' => 'demo:29' ,
'valid' => 'false' ,
'asOfDateTime' => '2013-02-08T10:09:09.273Z' ,
'model' => [
'info:fedora/demo:UVA_STD_IMAGE' ,
'info:fedora/fedora-system:FedoraObject-3.0' ,
],
'problem' => [
'test'
] ,
'datastream' => [
{
'dsID' => 'url' ,
'problem' => [
"Datastream 'url' is does not have the FORMAT_URI and MIME_TYPE attributes required by 'demo:UVA_STD_IMAGE'" ,
]
}
] ,
}
so you build a Catmandu::FedoraCommons with your URL and creds, you call validate on a pid, you ->parse_content the whole thing, and what you get back is that hashref of dreams up there: pid, valid, asOfDateTime, the model list, the problem list, and a datastream list where every lil' datastream can carry its own dsID and its own problem list. π¦
π SEE ALSO π
Catmandu::FedoraCommonsβ go read that one too, she's the main character π
lowkey reminder: every field in that returned hashref is just copied straight from the example β don't go inventing new keys and blaming me, bestie π«Ά
and that's the whole page, periodt. π this was perl v5.36.0, dated 2023-02-05, filed under Catman...lidate(3pm) β she ate, no crumbs, mwah πβ¨
π¦ 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