Catman...::MODS(3pm)
β¨ NAME β¨
Catmandu::Importer::MODS β bestie, it's the Catmandu importer for pulling in mods records π
(also known around these parts as the Catman...::MODS(3pm) page from User Contributed Perl Documentation, section 3pm, no cap π«Ά)
πΈ SYNOPSIS πΈ
use Catmandu::Importer::MODS;
my $importer = Catmandu::Importer::MODS->new(file => "modsCollection.xml");
my $numModsElements = $importer->each(sub{
my $modsElement = shift; # a MODS::Element::Mods object
});
literally the whole vibe in four lines β¨
π¦ DESCRIPTION π¦
okay so this Catmandu::Importer reads MODS records so Catmandu can do its little processing thing on them π
- got a simple
modsdocument? then you get oneMODS::Element::Modsitem imported. one. single. iconic. - got a
modsCollectioninstead? then several items get imported. slay π₯
and if you want the methods and options that come from Catmandu::Importer, Catmandu::Iterable, Catmandu::Logger and Catmandu::Fixable β go look at those modules, they're where all that inherited goodness lives π
β οΈ bestie please, make sure your files are expressed in UTF-8. not playing about that one π«Ά
π CONFIGURATION π
typeβ defaults to"xml", because MODS is usually expressed in XML (obviously π). wanna use a custom JSON format instead? set it to"json"β or just hand it a file with the.jsonextension and it'll clock it. this custom JSON format was introduced in the moduleMODS::Recordβ
π SEE ALSO π
see Catmandu::MODS for more info about MODS and Catmandu π
and that's the whole page, bestie β documented under perl v5.36.0, dated 2022-11-19, filed as Catman...::MODS(3pm). periodt π
β¨
π¦ where this page comes from
- debian bookworm: libcatmandu-mods-perl 0.31-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-mods-perl 0.31-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-mods-perl 0.31-3 Β· 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