AutoReply(3pm)
π AutoReply β the perl module page, but make it cute
okay bestie, so this is News::AutoReply, which lives in the User Contributed Perl Documentation zone (that's the manual name, it's a 3pm page, iykyk). It's a lil derivative of News::Article that's specifically built for generating autoreplies β like, the automatic "hey I got ur message!" kind, but done properly. π«Ά
β¨ NAME β¨
News::AutoReply β a derivative of News::Article for generating autoreplies. she's giving "I answer for you while you're away" π
πΈ SYNOPSIS πΈ
the whole vibe in two lines:
use News::AutoReply;
$reply = News::AutoReply->new($message);
that's it. that's the tea. π
π¦ DESCRIPTION π¦
So, like News::Article, right? Same energy, same family. BUT β and this is the main character twist β you must hand her a reference to another article at creation time. She needs that original to work with, because she's gonna initialise To, In-Reply-To, References, etc. correctly as an automatic reply. No chaos headers, no broken threading, just clean reply vibes. β¨
π USAGE π
use News::AutoReply;
Exports nothing. nope, not a single thing, she's mysterious like that π
π Constructor π
new ( ORIGINAL )β okay so this constructs an autoreply to a message, and the whole thing hinges on assuming that theReply-Toheader ofORIGINALis valid β or, ifReply-Toisn't there, then theFromheader. That's whose address she's replying to, periodt.
She returns you a brand new Article object that has no body and no envelope sender, but she does come with suitable headers all set up. iconic. π
Now here's the juicy bit: if an environment variable LOOP is defined, its value gets used as the contents of an X-Loop header that's added to the reply. Super handy when you're using this code in progs launched from a procmail recipe. π And she always preserves X-Loop headers that were in the original β no matter what, those survive.
also ngl, a heads up from the source itself: the reference-folding code could probably be improved. not saying it's bad, just saying the author said it, and we respect transparency π
π AUTHOR π
Andrew Gierth <andrew@erlenstar.demon.co.uk>
β SOURCE β
Contact the author. (yes literally, that's the whole source section, go say hi π«Ά)
π COPYRIGHT π
Copyright 1997 Andrew Gierth <andrew@erlenstar.demon.co.uk>
This code may be used and/or distributed under the same terms as Perl itself. slay, same license as Perl, we love to see it. π
and that's the whole page bestie!! π she's from perl v5.36.0 and this version is dated 2022-10-15 β so when you see AutoReply(3pm) floating around, you'll know exactly what's up. mwah πβ¨
π¦ where this page comes from
- ubuntu noble: libnews-article-perl 1.27-12 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnews-article-perl 1.27-12 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnews-article-perl 1.27-12 Β· 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