Jakob Voß
and 1 contributors

NAME

Catmandu::Importer::PICA - Package that imports PICA+ data

VERSION

version 0.14

SYNOPSIS

    use Catmandu::Importer::PICA;

    my $importer = Catmandu::Importer::PICA->new(file => "pica.xml", type=> "XML");

    my $n = $importer->each(sub {
        my $hashref = $_[0];
        # ...
    });

To convert between PICA+ syntax variants with the catmandu command line client:

    catmandu convert PICA --type xml to PICA --type plain < picadata.xml

PICA

Parse PICA XML to native Perl hash containing two keys: '_id' and 'record'.

  {
    'record' => [
                  [
                    '001@',
                    '',
                    '0',
                    '703'
                  ],
                  [
                    '001A',
                    '',
                    '0',
                    '2045:10-03-11'
                  ],
                  [
                    '028B',
                    '01',
                    'd',
                    'Thomas',
                    'a',
                    'Bartzanas'
                   ]

    '_id' => '658700774'
  },

METHODS

This module inherits all methods of Catmandu::Importer and by this Catmandu::Iterable.

CONFIGURATION

In addition to the configuration provided by Catmandu::Importer (file, fh, etc.) the importer can be configured with the following parameters:

type

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) and plus or picaplus for normalized PICA+.

AUTHOR

Johann Rolschewski <rolschewski@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Johann Rolschewski.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.