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

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

πŸ’– NAME πŸ’–

MAB2::Parser::RAW β€” it's a parser for MAB2 RAW format, bestie, and it's literally the whole point of this page πŸ’…

(also hi, you're reading the MAB2::Parser::RAW(3pm) page from the User Contributed Perl Documentation, iykyk πŸŽ€)


✨ SYNOPSIS ✨

okay so MAB2::Parser::RAW is a parser for raw MAB2 records. that's it, that's the vibe. πŸ¦‹

here's the tea though: MAB2::Parser::RAW expects UTF-8 encoded files as input. if that's not what you're serving, then instead provide a filehandle that has a specified I/O layer. no cap.

use MAB2::Parser::RAW;

my $parser = MAB2::Parser::RAW->new( $filename );

while ( my $record_hash = $parser->next() ) {
    # do something
}

🌸 Arguments 🌸

  • "file" β€” path to the file with MAB2 Band records πŸ“
  • "fh" β€” an open filehandle for the file with MAB2 Band records πŸ“‚

πŸ‘‘ METHODS πŸ‘‘

🌈 new($filename | $filehandle)

this is the constructor, bestie β€” hand it either a $filename or a $filehandle and it's giving brand new parser energy ✨

🫢 next()

reads the next record from the MAB2 input stream, and returns a Perl hash. one at a time, like a little snack πŸ“

🧚 _decode($record)

deserialize a raw MAB2 record into an ARRAY of ARRAYs. iconic nested-array behaviour, periodt πŸ’œ


⭐ SEEALSO ⭐

  • Catmandu::Importer::MAB2 β€” go look at this one too, fr fr πŸ‘€

πŸŽ€ AUTHOR πŸŽ€

Johann Rolschewski <jorol@cpan.org> β€” absolute legend, we stan πŸ’–


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. slay 🌸


and that's the whole page, bestie β€” no notes, 10/10, main character documentation energy πŸ’–

perl v5.36.0 ✦ 2022-12-04 ✦ MAB2::...er::RAW(3pm) β€” mwah, bye bestie, go parse some records πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from