Mail::B...rser::C(3)
π NAME π
Mail::Box::Parser::C β parsing folders for MailBox with C routines, bestie β¨
π INHERITANCE π
okay so the family tree is giving main character energy:
Mail::Box::Parser::C
is a Mail::Box::Parser
is a Mail::Reporter
Mail::Box::Parser::C
is a DynaLoader
π¦ SYNOPSIS π¦
girl. there is literally nothing here. the synopsis section is empty. that's it, that's the section π (still keeping it though, we respect the order of things)
πΈ DESCRIPTION πΈ
So Mail::Box::Parser::C implements parsing of messages in ANSI C, using Perl's XS extension facility. Fancy, right? π₯
It's an optional module for MailBox, and once it's installed it will automatically be used by MailBox to parse e-mail message content β but only when the message is supplied as a file-handle. In all other cases, MailBox will use Mail::Box::Parser::Perl. no cap, that's just how it goes π
β οΈ Be aware, bestie: this module, versions 4.00 and up, is not fully compatible with older releases β mainly the exception handling has changed π. When you need to upgrade, please read https://github.com/markov2/perl5-Mail-Box/wiki/ β Version 3 is still maintained and may see new releases as well π«Ά
Extends "DESCRIPTION" in Mail::Box::Parser.
β¨ METHODS β¨
Extends "METHODS" in Mail::Box::Parser.
π Constructors
Extends "Constructors" in Mail::Box::Parser.
$class->new(%options)β inherited, see"METHODS"in Mail::Box::Parser
Here's the whole options table, every single one, no skipping π
fileβ defaultundeffilenameβ default<required>fix_header_errorsβ defined inMail::Box::Parserβ defaultfalsemodeβ default'r'trustedβ defined inMail::Box::Parserβ defaultfalse
And now the glow-up details π
file => $filehandleβ anyIO::Fileor"GLOB"$filehandlewhich can be used to read the data from. In case this option is specified, the"filename"is informational only πfilename => FILENAMEβ the name of the file to be read.fix_header_errors => BOOLEANmode => $modeβ file open$mode, which defaults to'r', which meansread-only. See"perldoc -f open"for possible modes. Only applicable when no"file"is specified πtrusted => BOOLEAN
π§ Attributes
Extends "Attributes" in Mail::Box::Parser.
$obj->boxnr()β the number internally used by the C implementation to administer a single mail folder access. iykyk π’$any->defaultParserType( [$class] )β inherited, see"Attributes"in Mail::Box::Parser$obj->file()β only returns a value when passed as instantiation parameter. Otherwise, the used file-handle stays in 'C-space'. The connection between C and Perl is via theboxnr(). spooky? no, iconic π$obj->filename()β returns the name of the file this parser is working on.$obj->fixHeaderErrors( [BOOLEAN] )β inherited, see"Attributes"in Mail::Box::Parser$obj->openMode()$obj->trusted()β inherited, see"Attributes"in Mail::Box::Parser
π Parsing
Extends "Parsing" in Mail::Box::Parser.
$obj->bodyAsFile( $fh [$chars, [$lines]] )β inherited, see"Parsing"in Mail::Box::Parser$obj->bodyAsList( [$chars, [$lines]] )β inherited, see"Parsing"in Mail::Box::Parser$obj->bodyAsString( [$chars, [$lines]] )β inherited, see"Parsing"in Mail::Box::Parser$obj->bodyDelayed( [$chars, [$lines]] )β inherited, see"Parsing"in Mail::Box::Parser$obj->lineSeparator()β inherited, see"Parsing"in Mail::Box::Parser$obj->readHeader()β inherited, see"Parsing"in Mail::Box::Parser$obj->start(%options)β start the parser by opening a file πfileβ defaultundeffile => FILEHANDLE|undefβ the file is already open, for instance because the data must be read fromSTDINπ«Ά
$obj->stop()β stop the parser, which will include a close of the file. The lock on the folder will not be removed (is not the responsibility of the parser) π«π. Improves base, see"Parsing"in Mail::Box::Parser
π Error handling
Extends "Error handling" in Mail::Box::Parser.
$obj->AUTOLOAD()β inherited, see"Error handling"in Mail::Reporter$obj->notImplemented()β inherited, see"Error handling"in Mail::Reporter
π Cleanup
Extends "Cleanup" in Mail::Box::Parser.
$obj->DESTROY()β inherited, see"Cleanup"in Mail::Reporter
π₯ DIAGNOSTICS π₯
- Error: class $package does not implement method $method. Fatal error, bestie π: the specific
$package(or one of its superclasses) does not implement this method where it should. This message means that some other related classes do implement this method, however the class at hand does not. Probably you should investigate this and probably inform the author of the package. Cast bynotImplemented(). - Error: filename or handle required to create a parser. Cast by
new()π« - Error: parser $type does not extend $pkg. Cast by
defaultParserType() - Warning: unexpected end of header in $source: $line While parsing a message from the specified source (usually a file name), the parser found a syntax error. According to the MIME specification in the RFCs, each header line must either contain a colon, or start with a blank to indicate a folded field. Apparently, this header contains a line which starts on the first position, but not with a field name π
By default, parsing of the header will be stopped. If there are more header lines after the erroneous line, they will be added to the body of the message. In case of new(fix_header_errors) set, the parsing of the header will be continued. The erroneous line will be added to the preceding field. Cast by readHeader() πΈ
π¦ SEE ALSO π¦
This module is part of Mail-Box-Parser-C version 4.01, built on February 25, 2026. Website: http://perl.overmeer.net/CPAN/ β go look, it's giving resources π
π LICENSE π
For contributors see file ChangeLog.
This software is copyright (c) 2002-2026 by Mark Overmeer.
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 β perl v5.44.0, dated 2026-10-17, signing off πβ¨π
π¦ where this page comes from
- arch rolling: perl-mail-box-parser-c 4.01-2 Β· GPL AND PerlArtistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms