Catmandu::Exporter::MAB2(3pm)

Catmandu::Exporter::MAB23pm

Package that exports mab2 data

Usage

    use Catmandu::Exporter::MAB2;
 
    my $exporter = Catmandu::Exporter::MAB2->new(file => "mab2.dat", type => "RAW");
    my $data = {
     record => [
        ...
        [245, '1', 'a', 'Cross-platform Perl /', 'c', 'Eric F. Johnson.'],
        ...
        ],
    };
 
    $exporter->add($data);
    $exporter->commit;

Arguments

"file"

Path to file with MAB2 records.

"fh"

Open filehandle for file with MAB2 records.

"type"

Specify type of MAB2 records: Disk (Diskette), RAW (Band), XML. Default: 001. Optional.

"xml_declaration"

Write XML declaration. Set to 0 or 1. Default: 0. Optional.

"collection"

Wrap records in collection element (<datei>). Set to 0 or 1. Default: 0. Optional.

Methods

new(file => $file | fh => $filehandle [, type => XML, xml-declaration => 1, collection => 1])

Create a new Catmandu MAB2 exports which serializes into a $file.

add($data)

Add record to exporter.

commit()

Close collection (optional) and filehandle.

Configuration

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

type

MAB2 syntax variant. See Catmandu::Importer::MAB2.

xml_declaration

Write XML declaration. Set to 0 or 1. Default: 0. Optional.

collection

Wrap records in collection element (<datei>). Set to 0 or 1. Default: 0. Optional.

Releases

6 releases since Debian 8 (Jessie); the text changed 4 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12–13

Author

Johann Rolschewski <[email protected]>

From libcatmandu-mab2-perl 0.24-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.