Mail::...elayed(3pm)

πŸ’Œ Mail::Message::Body::Delayed β€” the manual page

okay bestie, listen up, we're diving into Mail::Message::Body::Delayed, a lil cutie from the User Contributed Perl Documentation corner of the 3pm section. she's giving "body of a message but we haven't actually read it yet" energy and honestly? iconic.


πŸŽ€ NAME πŸŽ€

Mail::Message::Body::Delayed β€” the body of a Mail::Message, except it hasn't been read yet. it's the idea of a body. the concept. the possibility. πŸ’…


🌸 INHERITANCE 🌸

she's got a whole family tree, and here's the tea:

Mail::Message::Body::Delayed realizes a Mail::Message::Body

Mail::Message::Body::Delayed is a Mail::Reporter

Mail::Message::Body::Delayed is a Mail::Reporter

yes, the Mail::Reporter thing is listed twice. no, i'm not editing that, the manpage said it twice and we respect the manpage in this house. 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

See Mail::Message::Body

that's it. that's the synopsis. she's minimal, she's mysterious, go read the parent's docs. ✨


πŸ’– DESCRIPTION πŸ’–

so here's the vibe: message bodies of this type get swapped out for another type the literal second you touch the content. like, the moment you go looking for the actual body, poof, it's been replaced. gone, girlbossed out of existence, replaced by its true form.

and in this very documentation (yes, the one you're reading rn πŸ’€) you'll find the description of how a message body gets delay loaded. lowkey fascinating, highkey useful.

Extends "DESCRIPTION" in Mail::Reporter.


🌈 OVERLOADED 🌈

the ways this object can pretend to be other things, and she does it beautifully:

  • overload: "" stringification β€” returns the body as a string, which will trigger completion (yeah, touching her makes her real, we covered this). EXCEPT when it's being called to produce a string for Carp β€” in that case she holds back, purely to avoid deep recursions. no cap, that's the reason.

Β» example: stringification of delayed body

print $msg->body;   # implicit by print

my $body = $msg->body;
my $x    = "$body"; # explicit by interpolation
  • overload: @{} access as ARRAY β€” when somebody uses a body object like it's an array reference, you get the lines of the body back. same thing as calling the "lines" method, so don't @ her about it twice.
  • overload: bool existence β€” always returns a "true" value. why? because overloaded objects need it to work in stuff like if($body). without it you'd be stuck writing "if(defined $body)" just to dodge a runtime error. tragic. we love the shortcut instead. πŸ’œ

✨ METHODS ✨

Extends "METHODS" in Mail::Reporter.

🧸 Constructors

Extends "Constructors" in Mail::Reporter.

  • $class->new(%options) β€” Inherited, see "Constructors" in Mail::Reporter.

here's the option table, bestie:

 -Option --Default
  message  <required>
  • message => MESSAGE β€” the MESSAGE object that contains this delayed body. yeah, she needs to know who her parent is.

🐚 Attributes

Extends "Attributes" in Mail::Reporter.

🚨 Error handling

Extends "Error handling" in Mail::Reporter.

  • $obj->AUTOLOAD() β€” Inherited, see "Error handling" in Mail::Reporter
  • $obj->notImplemented() β€” Inherited, see "Error handling" in Mail::Reporter

🧹 Cleanup

Extends "Cleanup" in Mail::Reporter.

  • $obj->DESTROY() β€” Inherited, see "Cleanup" in Mail::Reporter

πŸ’Œ The body

  • $obj->message()

πŸ” About to the payload

  • $obj->guessSize()
  • $obj->isDelayed()
  • $obj->isModified()
  • $obj->isMultipart()
  • $obj->modified()
  • $obj->nrLines()

πŸ› οΈ Internals

  • $obj->fileLocation( [$begin, $end] )
  • $obj->load() β€” returns the loaded version of this body. she finally reveals herself. main character moment. πŸ‘‘
  • $obj->moveLocation($distance)
  • $obj->read($parser, $head, $bodytype)

😭 DIAGNOSTICS 😭

when things go sideways, she has feelings about it:

  • Error: a message must be specified to a delayed body. Cast by new()
  • 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()

πŸ‘€ SEE ALSO πŸ‘€

this module is part of Mail-Box version 4.02, built on April 10, 2026. Website: http://perl.overmeer.net/CPAN/


πŸ“œ 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, open source. πŸ’–


okay that's the whole page, bestie. no skips, no cuts, every single flag and diagnostic accounted for. πŸŽ€

and that's a wrap from perl v5.40.1, dated 2026-05-09 β€” same energy as always from the Mail::...elayed(3pm) crew. go forth and delay-load your bodies responsibly. periodt. 🌈✨

πŸ“¦ where this page comes from