Catmandu::Importer::MODS - Catmandu Importer for importing mods records
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 });
This Catmandu::Importer reads MODS records to be processed with Catmandu. In case of a simple "mods" document, one MODS::Element::Mods item is imported. In case of a "modsCollection", several items are imported.
See Catmandu::Importer, Catmandu::Iterable, Catmandu::Logger and Catmandu::Fixable for methods and options derived from these modules.
Make sure your files are expressed in UTF-8.
Set to xml by default, as MODS is usually expressed in XML. Use json (or provide a file with extension .json) for a custom JSON format, introduced in module MODS::Record.
xml
json
.json
See Catmandu::MODS for more information about MODS and Catmandu.
To install Catmandu::MODS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu::MODS
CPAN shell
perl -MCPAN -e shell install Catmandu::MODS
For more information on module installation, please visit the detailed CPAN module installation guide.