Mail::S...ch::PTR(3)

πŸ’– Mail::S...ch::PTR(3) β€” bestie edition πŸ’–

okay so this is a page from the User Contributed Perl Documentation, filed under Mail::S...ch::PTR(3), and it's literally all about one tiny-but-mighty little class. buckle up πŸŽ€


✨ NAME ✨

Mail::SPF::Mech::PTR β€” the SPF record "ptr" mechanism class, no cap πŸ‘‘


🌸 VERSION 🌸

version 3.20260331 β€” yes she's got a version number and yes she's serving πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so, an object of class Mail::SPF::Mech::PTR represents an SPF record mechanism of type "ptr". that's the whole vibe. it's giving "specific, focused, iconic" ✨


πŸŽ€ Constructors πŸŽ€

here are the constructors, bestie β€” the ways you can bring one of these into existence:

  • new(%options) β€” returns Mail::SPF::Mech::PTR

creates a brand new SPF record "ptr" mechanism object 🫢

%options is a list of key/value pairs, and it can hold any of these:

  • qualifier
  • domain_spec

see "new" in Mail::SPF::Mech for the deets, iykyk.

  • new_from_string($text, %options) β€” returns Mail::SPF::Mech::PTR; throws Mail::SPF::ENothingToParse, Mail::SPF::EInvalidMech

creates a new SPF record "ptr" mechanism object by parsing the string and any options you hand it. and yes she throws β€” Mail::SPF::ENothingToParse and Mail::SPF::EInvalidMech are both on the table, so mind your input πŸ’€


πŸ‘‘ Class methods πŸ‘‘

the following class methods are provided:

  • default_qualifier
  • qualifier_pattern

see "Class methods" in Mail::SPF::Mech for the lore.

  • name β€” returns string

returns 'ptr'. that's it. that's the whole method. she knows her name and she's not confused about it πŸ’…

  • name_pattern β€” returns Regexp

returns a regular expression that matches a mechanism name of 'ptr'. regex girlies rise 🌈


🧚 Instance methods 🧚

the following instance methods are provided:

  • text
  • qualifier
  • params
  • stringify

see "Instance methods" in Mail::SPF::Mech for the full rundown.

  • domain_spec β€” returns Mail::SPF::MacroString

returns the "domain-spec" parameter of the mechanism. just the parameter. as advertised πŸ’–

  • match($server, $request) β€” returns boolean

checks whether the mechanism's target domain name β€” or a sub-domain thereof β€” is a "valid" domain name for the given request's IP address (see "ip_address" in Mail::SPF::Request), and returns true if it does, or false otherwise. want to know how domains get validated? see "valid_domain_for_ip_address" in Mail::SPF::Util. and if you want the algorithm-equivalent version of this whole situation, see RFC 4408, section 5.5 πŸ”₯


⭐ SEE ALSO ⭐

for availability, support, and license information, see the README file included with Mail::SPF. read the README bestie, it's right there 🫢


πŸ’œ AUTHORS πŸ’œ

Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org> β€” absolute icons, we stan πŸ‘‘


and that's the page, fr fr 🌸 this whole thing came to you courtesy of perl v5.42.1, dated 2026-04-23, under the page name Mail::S...ch::PTR(3). slay, go write some SPF records πŸ’–βœ¨

πŸ“¦ where this page comes from