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) 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.

$bool = $addr->is_valid()

Check whether the current object contains a valid 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.

Returns true if an email could be parsed, otherwise false.

$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.