Catmandu::Importer::PICA - Package that imports PICA+ data
use Catmandu::Importer::PICA; my $importer = Catmandu::Importer::PICA->new(file => "pica.xml", type=> "XML"); my $n = $importer->each(sub { my $hashref = shift; # ... });
To convert between PICA+ syntax variants with the catmandu command line client:
catmandu convert PICA --type xml to PICA --type plain < picadata.xml
Parses PICA format to native Perl hash containing two keys _id and record. See PICA::Data for more information about PICA data format and record structure.
_id
record
This module inherits all methods of Catmandu::Importer and by this Catmandu::Iterable.
In addition to the configuration provided by Catmandu::Importer (file, fh, etc.) the importer can be configured with the following parameters:
file
fh
Describes the PICA+ syntax variant. Supported values (case ignored) include the default value xml for PicaXML, plain for human-readable PICA+ serialization (where $ is used as subfield indicator), plus or picaplus for normalized PICA+, binary for binary PICA+ and ppxml for the PICA+ XML variant of the DNB.
xml
plain
$
plus
picaplus
binary
ppxml
To install Catmandu::PICA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu::PICA
CPAN shell
perl -MCPAN -e shell install Catmandu::PICA
For more information on module installation, please visit the detailed CPAN module installation guide.