---
name: "Dpkg::Email::Address"
section: "3perl"
platform: "linux"
package: "dpkg"
version: "1.23.11-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Dpkg::Email::Address"
---

# Dpkg::Email::Address(3perl)

manage an email address

## NAME

Dpkg::Email::Address - manage an email address

## DESCRIPTION

It provides a class which is able to manage an email address, as used in [**deb822**(5)](/deb822/5.md) data.

## FUNCTIONS

- $regex = **REGEX()**

  Returns the regex used to parse and validate an email address.

  It matches two parts, the name and the email.

## METHODS

- $addr = Dpkg::Email::Address-\>new($string)

  Create a new object that can hold an email address.

- $name = $addr-\>name(\[$name\])

  Get and optionally set the email address name.

  Returns the current or new email name.

- $email = $addr-\>email(\[$email\])

  Get and optionally set the email address email.

  Returns the current or new email.

- $bool = $addr-\>parse($string)

  Parses `$string` into the current object replacing the current address.

  Will die on parse errors.

- $string = $addr-\>**as\_string()**

  Returns the email address formatted as a string.

- $hashref = $addr-\>**as\_struct()**

  Returns the email address in a hashref with name and email keys.

## CHANGES

### Version 0.xx

This is a private module.
