MAB2::...er::RAW(3pm)

πŸ“¦
version 0.24 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ¦‹ MAB2::...er::RAW(3pm) β€” ok bestie, sit DOWN πŸ¦‹

Welcome to the manual page for MAB2::Writer::RAW β€” it's giving "Perl User Contributed Documentation," it's giving 3pm, and it's literally the moment you've all been waiting for. πŸ’…


✨ NAME ✨

MAB2::Writer::RAW β€” a MAB2 RAW format serializer. That's it. That's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

So MAB2::Writer::RAW is a MAB2 serializer, periodt. Here's the whole thing, no edits, no cap:

use MAB2::Writer::RAW;

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::RAW->new( fh => $fh );

foreach my $record (@mab_records) {
    $writer->write($record);
}

Notice how a record can be a bare arrayref OR a hashref with a record key? Both are valid, both are iconic. 🫢


πŸ’œ Arguments πŸ’œ

See MAB2::Writer::Handle. That's where the args live, bestie β€” this page is not the one holding that info. πŸ™ˆ


πŸ”₯ METHODS πŸ”₯

⭐ new(file => $file | fh => $fh [, encoding => 'UTF-8'])

The constructor. You hand it either a file or an fh (pick your fighter), and optionally an encoding which defaults to 'UTF-8'. Slay. ✨

⭐ _write_record($record)

The internal record-writing method, taking $record. It's underscore-prefixed, so you know what that means β€” iykyk. πŸ‘‘


πŸ‘‘ SEEALSO πŸ‘‘

Go read these next, fr fr:

  • MAB2::Writer::Handle
  • Catmandu::Exporter

πŸŽ€ AUTHOR πŸŽ€

Johann Rolschewski <jorol@cpan.org> β€” the main character who made this happen. πŸ’–


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. No cap, that's the actual license. πŸ¦‹


Reminder bestie: this page is MAB2::...er::RAW(3pm) from the User Contributed Perl Documentation β€” generated by perl v5.36.0, dated 2022-12-04. That's the footer energy, and I'm obsessed with it. πŸ’œβœ¨
πŸ“¦ where this page comes from