Mail::...Learner(3pm)

πŸ’– NAME πŸ’–

Mail::SpamAssassin::PerMsgLearner β€” bestie, this is the per-message status object, aka "is this mail spam or not-spam" 🌸

(so like, the manual page is filed under Mail::...Learner(3pm), that's just the short lil nickname okurrr)


✨ SYNOPSIS ✨

my $spamtest = Mail::SpamAssassin->new({
  'rules_filename'      => '/etc/spamassassin.rules',
  'userprefs_filename'  => $ENV{HOME}.'/.spamassassin/user_prefs'
});
my $mail = $spamtest->parse();

my $status = $spamtest->learn($mail,$id,$isspam,$forget);
my $didlearn = $status->did_learn();
$status->finish();

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so, when you call the Mail::SpamAssassin learn() method, it hands you back an object of this class. no cap. 🫢

and what does this object do? it encapsulates all the per-message state for the learning process. that's it, that's the whole vibe β€” every lil scrap of status that the learning process needs to keep track of for one single message, all bundled up in here like a cute little tote bag πŸŽ€


πŸ’… METHODS πŸ’…

  • $didlearn = $status->did_learn() β€” returns 1 if the message was learned from, or forgotten, successfully. iconic behaviour honestly. πŸ’š
  • $status->finish() β€” wrap it up bestie, finish with the object. that's a wrap, periodt. ✨

πŸ‘‘ SEE ALSO πŸ‘‘


that's the whole page babes, go off πŸ’œ

signing off on behalf of perl v5.40.1, dated 2026-07-23, and of course our main character Mail::...Learner(3pm) β€” mwah πŸ’‹ slay 🌈⭐

πŸ“¦ where this page comes from