MAB2::...::Disk(3pm)
πΈ NAME πΈ
MAB2::Writer::Disk β it's the MAB2 Diskette format serializer, bestie. That's the whole vibe. It takes your MAB2 records and writes them out in Diskette format, no cap. π
(Also, hi, this page lives in the User Contributed Perl Documentation corner of the manual-verse, and its manual name is MAB2::...::Disk(3pm). Now you know. π)
β¨ SYNOPSIS β¨
Okay so MAB2::Writer::Disk is a MAB2 Diskette serializer. That's it, that's the girl. π
use MAB2::Writer::Disk;
my @mab_records = (
[
['001', ' ', '_', '2415107-5'],
['331', ' ', '_', 'Code4Lib journal'],
['655', 'e', 'u', 'http://journal.code4lib.org/', 'z', 'kostenfrei'],
...
],
{
record => [
['001', ' ', '_', '2415107-5'],
['331', ' ', '_', 'Code4Lib journal'],
['655', 'e', 'u', 'http://journal.code4lib.org/', 'z', 'kostenfrei'],
...
]
}
);
$writer = MAB2::Writer::Disk->new( fh => $fh );
foreach my $record (@mab_records) {
$writer->write($record);
}
Likeβ¦ look at her go. π¦ You make the writer, you loop your records, you write them. Iconic behaviour, honestly.
π· Arguments π·
subfield_indicatorβ this one sets the subfield separator for you. If you don't pass anything, the default isINFORMATION SEPARATOR ONE. It's optional, so no pressure, you do you. π
Also peep MAB2::Writer::Handle for more, iykyk. π
π§ METHODS π§
Here's the lineup, periodt:
new(file => $file | fh => $fh [, encoding => 'UTF-8', subfield_separator => '$'])
The constructor, the main character moment. You give her a file or an fh, and optionally an encoding (like 'UTF-8') and a subfield_separator (like '$'). Slay. β¨
_write_record($record)
The little internal worker bee that actually writes out a record. π
π SEEALSO π
Go look at these too, bestie:
MAB2::Writer::HandleCatmandu::Exporter
π AUTHOR π
Johann Rolschewski <jorol@cpan.org> β the legend who made this. π«Ά
π 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. So like, go forth and remix, respectfully. π
Mwah, that's the whole page! This absolute bop was brought to you by perl v5.36.0 and dated 2022-12-04, from the MAB2::...::Disk(3pm) manual. Byeee, go serialize something cute! ππ¦
π¦ 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