-
-
23 Mar 2020 11:06:15 UTC
- Distribution: Catmandu-MAB2
- Module version: 0.24
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (186 / 0 / 9)
- Kwalitee
Bus factor: 1- 94.17% Coverage
- License: perl_5
- Perl: v5.14.0
- Activity
24 month- Tools
- Download (43.27KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Catmandu::Exporter::MAB2 - Package that exports MAB2 data
SYNOPSIS
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.
AUTHOR
Johann Rolschewski <jorol@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 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.
Module Install Instructions
To install Catmandu::MAB2, copy and paste the appropriate command in to your terminal.
cpanm Catmandu::MAB2
perl -MCPAN -e shell install Catmandu::MAB2
For more information on module installation, please visit the detailed CPAN module installation guide.