Mail::...:Lines(3pm)
π«Ά Mail::...:Lines(3pm) π«Ά
okay so this is a page from the User Contributed Perl Documentation, and yes the title got mangled into Mail::...:Lines(3pm) because some names are just too long for a header line. The real one, the full govt name, is Mail::Box::Parser::Lines. Buckle up bestie, we're parsing mail π
β¨ NAME β¨
Mail::Box::Parser::Lines β reading messages from file using Perl π
πΈ INHERITANCE πΈ
This is the family tree, no cap:
Mail::Box::Parser::Lines
is a Mail::Box::Parser
is a Mail::Reporter
So it is a Mail::Box::Parser, and that in turn is a Mail::Reporter. Generational excellence honestly π§¬
π SYNOPSIS π
(bestie there is literally nothing here. the original page has zero content under SYNOPSIS. it's a vibe. moving on π)
π¦ DESCRIPTION π¦
So Mail::Box::Parser::Lines implements parsing of messages in Perl, with an ARRAY as source. That's the whole personality: arrays in, parsed messages out β¨
Hint: this one is useful when the message is already in memory. And heads up β when you plan to use this yourself, you probably need to use Mail::Message::Construct::Read π
Extends "DESCRIPTION" in Mail::Box::Parser. (Translation: it's adding onto what the parent already said, and the parent's docs stay valid π«Ά)
π₯ METHODS π₯
Extends "METHODS" in Mail::Box::Parser.
π Constructors
Extends "Constructors" in Mail::Box::Parser.
$class->new(%options)β inherited, see "METHODS" inMail::Box::Parser
And here's the option lineup, exactly as it ships:
-Option --Defined in --Default
fix_header_errors Mail::Box::Parser false
lines <required>
source <required>
trusted Mail::Box::Parser false
Now the flavor of each one, one by one:
fix_header_errors => BOOLEANβ comes fromMail::Box::Parser, and its default isfalse.lines => \@linesβ you're handing it the lines as an arrayref. No default here, this one is<required>. You bring the lines or you bring nothing πsource => $nameβ the name of the source. Also<required>, so don't leave home without it.trusted => BOOLEANβ fromMail::Box::Parser, defaults tofalse.
π¦ Attributes
Extends "Attributes" in Mail::Box::Parser.
$any->defaultParserType( [$class] )β inherited, see "Attributes" inMail::Box::Parser$obj->fixHeaderErrors( [BOOLEAN] )β inherited, see "Attributes" inMail::Box::Parser$obj->lines()β Returns an ARRAY with the remaining lines. remaining is the key word, she's giving leftovers-core.$obj->source()β The name of the source. That's it. That's the tea β$obj->trusted()β inherited, see "Attributes" inMail::Box::Parser
β Parsing
Extends "Parsing" in Mail::Box::Parser. Every single one of these is inherited, so for the full lore you go read the parent:
$obj->bodyAsFile( $fh [$chars, [$lines]] )β inherited, see "Parsing" inMail::Box::Parser$obj->bodyAsList( [$chars, [$lines]] )β inherited, see "Parsing" inMail::Box::Parser$obj->bodyAsString( [$chars, [$lines]] )β inherited, see "Parsing" inMail::Box::Parser$obj->bodyDelayed( [$chars, [$lines]] )β inherited, see "Parsing" inMail::Box::Parser$obj->lineSeparator()β inherited, see "Parsing" inMail::Box::Parser$obj->readHeader()β inherited, see "Parsing" inMail::Box::Parser$obj->stop()β inherited, see "Parsing" inMail::Box::Parser
π Error handling
Extends "Error handling" in Mail::Box::Parser.
$obj->AUTOLOAD()β inherited, see "Error handling" inMail::Reporter$obj->notImplemented()β inherited, see "Error handling" inMail::Reporter
π§ Cleanup
Extends "Cleanup" in Mail::Box::Parser.
$obj->DESTROY()β inherited, see "Cleanup" inMail::Reporter
π DIAGNOSTICS π
Three whole moods, and they all go hard:
- Error: class $package does not implement method $method. Fatal error: 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(). π¨ (yeah, this one's a real "someone forgot to write the method" situation, no shade, just facts.) - Error: parser $type does not extend $pkg. Cast by
defaultParserType(). π - Warning: unexpected end of header in $source:\n $line Cast by
readHeader(). π the header just... stopped. it ran out mid-sentence.
π SEE ALSO π
This module is part of Mail-Message version 4.05, built on April 10, 2026. Website: http://perl.overmeer.net/mailbox/ β go look, iykyk π
π LICENSE π
For contributors see file ChangeLog. π
This software is copyright (c) 2001-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 also legally binding, which is a fun combo.
and that's the whole page bestie β written for perl v5.40.1, 2026-05-08, off the Mail::...:Lines(3pm) manual πβ¨ go parse some mail, you're the main character of this mailbox now ππ
π¦ where this page comes from
- ubuntu stonking: libmail-message-perl 4.05-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms