Catman...::MAB2(3pm)
β¨ NAME β¨
Catmandu::Exporter::MAB2 β bestie, it's the package that exports MAB2 data. That's it, that's the whole job description π
(oh and fun fact, this page lives in the perl section, manual name Catman...::MAB2(3pm) β iykyk π)
π SYNOPSIS π
okay so here's the vibe in code:
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;
literally that's the whole flow. new β add β commit. slay β¨
π¦ Arguments π¦
these are the little guys you can pass in:
fileβ the path to the file with your MAB2 records. πfhβ an already-open filehandle for the file with MAB2 records. π«Άtypeβ tells it what flavor of MAB2 records you're dealing with:Disk(Diskette),RAW(Band), orXML. Default:001. Optional. πΈxml_declarationβ writes the XML declaration. Set it to0or1. Default:0. Optional. β¨collectionβ wraps your records in a collection element (<datei>). Set it to0or1. Default:0. Optional. π
π METHODS π
π new(file => $file | fh => $filehandle [, type => XML, xml-declaration => 1, collection => 1])
Creates a brand new Catmandu MAB2 export that serializes into a $file. main character energy fr fr π
π add($data)
Drops a record into the exporter. one at a time, no rush bestie π
π commit()
Closes the collection (if you even have one, it's optional) and the filehandle. this is your goodbye kiss π
π§ CONFIGURATION π§
on top of all the config that Catmandu::Exporter already gives you (file, fh, etc. β the classics), the importer can also be configured with these parameters:
typeβ the MAB2 syntax variant. go peek atCatmandu::Importer::MAB2for the deets. πxml_declarationβ writes the XML declaration. Set to0or1. Default:0. Optional. β¨collectionβ wraps records in the collection element (<datei>). Set to0or1. Default:0. Optional. π
πΈ AUTHOR πΈ
Johann Rolschewski <jorol@cpan.org> β the icon, the legend, the moment π
π 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. free as in freedom, bestie ποΈ
and that's a wrap!! this page is fromperl v5.36.0, dated2022-12-04, filed underCatman...::MAB2(3pm)β go forth and export ur MAB2 records, periodt π πβ¨
π¦ where this page comes from
- debian bookworm: libcatmandu-mab2-perl 0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-mab2-perl 0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-mab2-perl 0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libcatmandu-mab2-perl 0.24-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms