---
name: "Mail::SPF::v2::Record"
section: "3pm"
platform: "linux"
package: "perl-mail-spf"
version: "3.20260331-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Mail::SPF::v2::Record"
---

# Mail::SPF::v2::Record(3pm)

Sender ID ("spf2.0") record class

## NAME

Mail::SPF::v2::Record - Sender ID ("spf2.0") record class

## VERSION

version 3.20260331

## SYNOPSIS

See Mail::SPF::Record.

## DESCRIPTION

An object of class **Mail::SPF::v2::Record** represents a **Sender ID** (`"spf2.0"`) record.

### Constructors

The following constructors are provided:

- **new(%options)**: returns *Mail::SPF::v2::Record*

  Creates a new Sender ID ("spf2.0") record object.

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

  - **text**

    - **terms**

    - **global\_mods**

    See "new" in Mail::SPF::Record.

  - **scopes**

    *Required*.  See "new" in Mail::SPF::Record.  The **'mfrom'** and **'pra'** scopes are supported.  There is no default.

- **new\_from\_string($text, %options)**: returns *Mail::SPF::v2::Record*; throws *Mail::SPF::ENothingToParse*, *Mail::SPF::EInvalidRecordVersion*, *Mail::SPF::ESyntaxError*

  Creates a new Sender ID ("spf2.0") record object by parsing the string and any options given.

### Class methods

The following class methods are provided:

- **version\_tag\_pattern**: returns *Regexp*

  Returns a regular expression that matches a version tag of **'spf2.0/'** plus a comma-separated list of any of the **'mfrom'** and **'pra'** scopes.  The following are valid version tags:

  ```
      spf2.0/mfrom
      spf2.0/pra
      spf2.0/mfrom,pra
      spf2.0/pra,mfrom
  ```

- **default\_qualifier**

  - **results\_by\_qualifier**

  See "Class methods" in Mail::SPF::Record.

### Instance methods

The following instance methods are provided:

- **text**

  - **scopes**

  - **terms**

  - **global\_mods**

  - **global\_mod**

  - **stringify**

  - **eval**

  See "Instance methods" in Mail::SPF::Record.

- **version\_tag**: returns *string*

  Returns **'spf2.0/'** plus a comma-separated list of the scopes of the record. See "version\_tag\_pattern" for a list of possible return values.

## SEE ALSO

Mail::SPF, Mail::SPF::Record, Mail::SPF::Term, Mail::SPF::Mech, Mail::SPF::Mod

\<http://tools.ietf.org/html/rfc4408\>

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

## AUTHORS

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