AutoReply(3pm)

πŸ“¦
version 1.27 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’Œ 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 the Reply-To header of ORIGINAL is valid β€” or, if Reply-To isn't there, then the From header. 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 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