Email::Thread(3pm)
π Email::Thread β the manual, but make it a group chat
ok so bestie, you found the page for Email::Thread (that's the 3pm one, a User Contributed Perl Documentation page, if you're keeping track π). It lives in the Perl docs, it's giving very niche, very useful, and I'm lowkey obsessed. Let's get into it. β¨
πΈ NAME πΈ
Email::Thread β use JWZ's mail threading algorithm with Email::Simple objects. no cap, that's the whole pitch. π¦
π VERSION π
version 0.713
π SYNOPSIS π
ok here's the vibe, copy-paste ready:
use Email::Thread;
my $threader = Email::Thread->new(@messages);
$threader->thread;
dump_em($_,0) for $threader->rootset;
sub dump_em {
my ($self, $level) = @_;
debug (' \\-> ' x $level);
if ($self->message) {
print $self->message->header("Subject") , "\n";
} else {
print "[ Message $self not available ]\n";
}
dump_em($self->child, $level+1) if $self->child;
dump_em($self->next, $level) if $self->next;
}
like. it threads your mail. then it dumps it. iconic behaviour honestly π
β¨ DESCRIPTION β¨
so technically-technically? it doesn't actually need Email::Simple objects. it just needs an object that responds to the same API. at the time of writing, the list of classes with the Email::Simple API comprises just Email::Simple. that's the whole list. one item. slay. π
and because of how it's implemented, its API is an exact clone of Mail::Thread. so go read that module's documentation for the API details, bestie β that's where the real tea is. just mentally substitute Email::Thread everywhere you see Mail::Thread, and Email::Thread::Container where you see Mail::Thread::Container. it's giving find-and-replace, and I mean that in the most affectionate way π«Ά
π PERL VERSION π
this module should work on any version of perl still receiving updates from the Perl 5 Porters. translation: any version of perl released in the last two to three years. (that is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) π
and now the caveat, listen up:
although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. the version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. so don't come for the maintainers with your ancient perl, okay? π
π«Ά THANKS π«Ά
- Simon Cozens (SIMON) β for encouraging me to release it, and for
Email::SimpleandMail::Thread. king behaviour fr fr π - Richard Clamp (RCLAMP) β for the header patch. the way that patch came through?? ate. π
π¦ SEE ALSO π¦
perl, Mail::Thread, Email::Simple
go read them, they're the supporting cast and they deserve their flowers πΈ
π AUTHOR π
Iain Truskett <spoon@cpan.org>
β CONTRIBUTOR β
Ricardo Signes <rjbs@semiotic.systems>
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2003 by Iain Truskett <spoon@cpan.org>.
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 like, go forth, remix, redistribute β legally, bestie π
and that's the page!! π this was perl v5.36.0, dated 2022-11-21, and it's the Email::Thread(3pm) page. thread your mail, dump your trees, stay hydrated, periodt. πβ¨π§
π¦ where this page comes from
- debian bookworm: libemail-thread-perl 0.713-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- debian trixie: libemail-thread-perl 0.713-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu noble: libemail-thread-perl 0.713-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu resolute: libemail-thread-perl 0.713-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu stonking: libemail-thread-perl 0.713-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms