Mail::SPF::Term(3)

πŸ’– Mail::SPF::Term πŸ’–

okay so bestie, welcome to Mail::SPF::Term, the SPF record term class ✨ this is the User Contributed Perl Documentation version, and yes she's serving.


🌸 VERSION 🌸

version 3.20260331 β€” fresh, iconic, no notes πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so a Mail::SPF::Term object is literally one term inside an SPF record. that's her whole job. she's a piece of the puzzle 🧩

BUT β€” and this is the important part β€” you cannot instantiate Mail::SPF::Term directly. she's abstract, she's mysterious, she's giving main character who never shows up in person 😭. if you want an actual object you gotta create an instance of a concrete sub-class instead. periodt.

πŸŽ€ Constructor πŸŽ€

here's the constructor bestie, she's abstract so don't come for her:

  • new(%options) β†’ returns Mail::SPF::Term Abstract ✨ Creates a new SPF record term object. %options is a list of key/value pairs β€” but heads up, Mail::SPF::Term itself specifies no constructor options. zero. nada. she's built different 🫢
  • new_from_string($text, %options) β†’ returns Mail::SPF::Term; throws Mail::SPF::ENothingToParse, Mail::SPF::EInvalidTerm Abstract ✨ Creates a new SPF record term object by parsing the string and any options given.
vibe check: this one can throw Mail::SPF::ENothingToParse or Mail::SPF::EInvalidTerm at you, so be ready bestie 😭

🌈 Class methods 🌈

the class methods are serving:

  • name_pattern β†’ returns Regexp Returns a regular expression that matches any legal name for an SPF record term. slay, a whole regex, just for the name πŸ’…

⭐ Instance methods ⭐

and here's what she can do once she exists:

  • text β†’ returns string; throws Mail::SPF::ENoUnparsedText Returns the unparsed text of the term. πŸ¦‹
ngl watch out: she throws a Mail::SPF::ENoUnparsedText exception if the term was created synthetically instead of being parsed, and no text was provided. so like… if there was never any text, there's no text to give you. make it make sense πŸ’€
  • name β†’ returns string Abstract ✨ Returns the name of the term. short, sweet, iconic.

πŸ’œ SEE ALSO πŸ’œ

go read your sisters, bestie, they're all connected iykyk:

  • Mail::SPF
  • Mail::SPF::Record
  • Mail::SPF::Mech
  • Mail::SPF::Mod

and also this, for the lore πŸ“œ:

http://tools.ietf.org/html/rfc4408

for availability, support, and license info, go check the README file included with Mail::SPF 🫢


πŸ‘‘ AUTHORS πŸ‘‘

give it up for the icons who made this happen:

  • Julian Mehnle <julian@mehnle.net>
  • Shevek <cpan@anarres.org>

perl v5.42.1 Β· 2026-04-23 Β· Mail::SPF::Term(3)

and that's the whole page bestie πŸ’– ty for reading, you ate that fr fr, go parse an SPF record and be iconic πŸŒΈβœ¨πŸ¦‹πŸŽ€πŸ’…

πŸ“¦ where this page comes from