Mail::S...Include(3)

πŸ’– NAME πŸ’–

Bestie, meet Mail::SPF::Mech::Include β€” it's the class that represents an SPF record include mechanism. (Yes, this is the <pink>Mail::S...Include(3)</pink> page from the User Contributed Perl Documentation, we're just vibing with it.)


✨ VERSION ✨

This is version 3.20260331, and yes it's giving very current, very slay. πŸ’…


🌸 DESCRIPTION 🌸

So basically, when you make an object of class Mail::SPF::Mech::Include, you've got yourself an SPF record mechanism of type include. That's the whole vibe. πŸ¦‹

πŸŽ€ Constructors

Here's the constructors on offer:

  • new(%options): returns Mail::SPF::Mech::Include β€” it makes you a brand-new SPF record include mechanism object, no cap. %options is a list of key/value pairs, and it can hold any of the following:
    • qualifier
    • domain_spec

For both of those, go peek at "new" in Mail::SPF::Mech.

  • new_from_string($text, %options): returns Mail::SPF::Mech::Include; throws Mail::SPF::ENothingToParse, Mail::SPF::EInvalidMech β€” this one builds you a fresh SPF record include mechanism object by parsing the string plus whatever options you handed over. ⭐

πŸ¦‹ Class methods

These are the class methods, iconic behavior only:

  • default_qualifier
  • qualifier_pattern

Both of those? Check "Class methods" in Mail::SPF::Mech, bestie.

  • name: returns string β€” literally just hands you back 'include'. That's it. That's the whole method. 🫢
  • name_pattern: returns Regexp β€” gives you back a regular expression that matches a mechanism name of 'include'.

πŸ’… Instance methods

And here's your instance methods, the moment you've been waiting for:

  • text
  • qualifier
  • params
  • stringify

All four live their truth over at "Instance methods" in Mail::SPF::Mech.

  • domain_spec: returns Mail::SPF::MacroString β€” returns the domain-spec parameter of the mechanism. Simple, clean, obsessed. ✨
  • match($server, $request): returns boolean β€” okay so this one does a recursive SPF check, using the SPF server and request objects you passed in, and it substitutes the mechanism's target domain name in place of the request's authority domain. Then the result of that recursive SPF check gets translated like this:
    • pass β†’ return true
    • fail β†’ return false
    • softfail β†’ return false
    • neutral β†’ return false
    • none β†’ throw PermError
    • permerror β†’ throw PermError
    • temperror β†’ throw TempError
Heads up: if you want the exact algorithm being used here, it's spelled out in RFC 4408, 5.2. Go read it, it's right there. πŸ“–

🌈 SEE ALSO 🌈

Go give these a look, they're all in the group chat:

And for availability, support, and license information, see the README file included with Mail::SPF. 🧚


πŸ‘‘ AUTHORS πŸ‘‘

Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org> πŸ’œ


Okay that's the whole page, we ate and left no crumbs. Sending you off with the receipts: this was perl v5.42.1, dated 2026-04-23, and it's the Mail::S...Include(3) page from the one and only User Contributed Perl Documentation. Byeeee πŸŽ€πŸ’–

πŸ“¦ where this page comes from