Mail::SPF::Mech::A(3)

πŸ’– Mail::SPF::Mech::A πŸ’–

okay bestie, welcome to the Mail::SPF::Mech::A page from the User Contributed Perl Documentation β€” this is the SPF record a mechanism class, and yes she is that girl ✨

Version: 3.20260331 πŸŽ€


🌸 DESCRIPTION 🌸

An object of class Mail::SPF::Mech::A represents an SPF record mechanism of type a. That's it, that's the vibe β€” she's the a mechanism, and she knows it πŸ’…


✨ Constructors ✨

Here's what you can build with, bestie:

  • new(%options): returns Mail::SPF::Mech::A β€” creates a brand new SPF record a mechanism object πŸ¦‹

%options is a list of key/value pairs representing any of the following options:

  • qualifier
  • domain_spec
  • ipv4_prefix_length
  • ipv6_prefix_length

See "new" in Mail::SPF::Mech for the deets on all of those 🫢

  • new_from_string($text, %options): returns Mail::SPF::Mech::A; throws Mail::SPF::ENothingToParse, Mail::SPF::EInvalidMech β€” creates a new SPF record a mechanism object by parsing the string and any options given. She parses, she throws if you hand her nonsense, iconic 😭

πŸ‘‘ Class methods πŸ‘‘

The following class methods are provided:

  • default_qualifier
  • default_ipv4_prefix_length
  • default_ipv6_prefix_length
  • qualifier_pattern

See "Class methods" in Mail::SPF::Mech ✨

  • name: returns string β€” returns 'a'. Short. Sweet. Main character energy πŸ‘‘
  • name_pattern: returns Regexp β€” returns a regular expression that matches a mechanism name of 'a' 🌈

πŸ’… Instance methods πŸ’…

The following instance methods are provided:

  • text
  • qualifier
  • params
  • stringify
  • domain
  • match_in_domain

See "Instance methods" in Mail::SPF::Mech πŸ’œ

  • domain_spec: returns Mail::SPF::MacroString β€” returns the "domain-spec" parameter of the mechanism πŸŽ€
  • ipv4_prefix_length: returns integer β€” returns the IPv4 network prefix length of the mechanism πŸ“
  • ipv6_prefix_length: returns integer β€” returns the IPv6 network prefix length of the mechanism 🧚
  • match($server, $request): returns boolean β€” checks whether the mechanism's target domain name (that is, any of its DNS "A" or "AAAA" host addresses) matches the given request's IP address (see "ip_address" in Mail::SPF::Request), and returns true if it does, or false otherwise. The mechanism's IP network prefix lengths are respected when matching address records against the request's IP address. See RFC 4408, 5, for the exact algorithm used. no cap, that's literally the whole thing πŸ”₯

🌟 SEE ALSO 🌟

For availability, support, and license information, see the README file included with Mail::SPF πŸ“–


🫢 AUTHORS 🫢

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

k bye bestie, go forth and match some A records πŸ’–βœ¨

perl v5.42.1 Β· 2026-04-23 Β· Mail::SPF::Mech::A(3) β€” slay, that's a wrap πŸŽ€πŸ‘‘

πŸ“¦ where this page comes from