MAB2::...er::XML(3pm)
β¨ MAB2::Parser::XML β the manual page, but make it cute β¨
okay bestie, so this is the docs for MAB2::Parser::XML (that's the 3pm section of the Perl manual, iykyk β the header up top truncates it to MAB2::...er::XML(3pm) which is honestly giving β¨mysteryβ¨ but it's literally just the same module). It's a MAB2 XML parser. That's the whole vibe. π
πΈ NAME πΈ
MAB2::Parser::XML β a MAB2 XML parser. no cap, that's it, that's the name. π
π¦ SYNOPSIS π¦
MAB2::Parser::XML is a parser for MAB2 XML records. she parses. that's her job. π
use MAB2::Parser::XML;
my $parser = MAB2::Parser::XML->new( $filename );
while ( my $record_hash = $parser->next() ) {
# do something
}
look at her go π₯Ή the while loop just keeps calling next() until there's nothing left. main character energy fr fr.
π Arguments π
fileβ path to the file with the MAB2 XML records. give her a path, she'll find it. πΊοΈfhβ an open filehandle for the file with MAB2 XML records. already opened, bestie, don't make her do it. πstringβ an XML string with MAB2 XML records. just raw string energy. β¨
π METHODS π
β new($filename | $filehandle | $string)
the constructor, the moment of creation, the birth of your parser π you can hand her a $filename, a $filehandle, or a $string β pick your fighter. any of the three works, she's flexible like that.
π next()
Reads the next record from the MAB2 XML input stream. Returns a Perl hash. π«Ά
like, one record at a time, she's not gonna dump the whole thing on you. hash in hand, ready to roll. keep calling her until she runs out.
π§ _decode($record)
Deserialize a MAB2 XML record to an an ARRAY of ARRAYs. π₯
(the original really does say "an an ARRAY of ARRAYs" and honestly? iconic. we keep the facts, we keep the typo, we keep the lore. π)
π SEEALSO π
Catmandu::Importer::MAB2. β go look at that one too, bestie, they're friends. πΈ
π AUTHOR π
Johann Rolschewski <jorol@cpan.org> β the legend who made this. bow down. π
π 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 yes, you can share her, remix her, whatever β same terms as Perl 5 itself. slay, legally. βοΈβ¨
and that's the whole page, bestie!! π¦ this was perl v5.36.0, dated 2022-12-04, and you found it under the manual page MAB2::...er::XML(3pm) (which is really MAB2::Parser::XML in the 3pm section, remember? π). mwah, go parse something gorgeous. π
ππ
π¦ 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