Dpkg::Email::Address(3perl) libdpkg-perl Dpkg::Email::Address(3perl)

# [NAME](#NAME)

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

# [DESCRIPTION](#DESCRIPTION)

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

# [FUNCTIONS](#FUNCTIONS)

$regex = **REGEX()**

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

It matches two parts, the name and the email.

# [METHODS](#METHODS)

$addr = Dpkg::Email::Address-&gt;new($string)

Create a new object that can hold an email address.

$name = $addr-&gt;name(\[$name])

Get and optionally set the email address name.

Returns the current or new email name.

$email = $addr-&gt;email(\[$email])

Get and optionally set the email address email.

Returns the current or new email.

$bool = $addr-&gt;parse($string)

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

Will die on parse errors.

$string = $addr-&gt;**as\_string()**

Returns the email address formatted as a string.

$hashref = $addr-&gt;**as\_struct()**

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

# [CHANGES](#CHANGES)

## [Version 0.xx](#Version_0.xx)

This is a private module.

2026-09-09 1.23.11-dirty

---

Document: Dpkg::Email::Address(3perl) from dpkg 1.23.11-r0 (Chainguard OS)
Source: https://git.dpkg.org/git/dpkg/dpkg.git
