Mail::...:Lines(3pm)

πŸ“¦
version 4.05 Β· 4 versions
, in ubuntu stonking

🫢 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" in Mail::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 from Mail::Box::Parser, and its default is false.
  • 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 β€” from Mail::Box::Parser, defaults to false.

πŸ¦‹ Attributes

Extends "Attributes" in Mail::Box::Parser.

  • $any->defaultParserType( [$class] ) β€” inherited, see "Attributes" in Mail::Box::Parser
  • $obj->fixHeaderErrors( [BOOLEAN] ) β€” inherited, see "Attributes" in Mail::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" in Mail::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" 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->stop() β€” inherited, 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 πŸ’€

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 by notImplemented(). 🚨 (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