NAME
OP::EmailAddr - Overloaded RFC 2822 email address object
VERSION
$Id: //depotit/tools/source/snitchd-0.20/lib/OP/EmailAddr.pm#4 $
SYNOPSIS
use OP::EmailAddr;
#
# From address:
#
do {
my $addr = OP::EmailAddr->new('root@example.com');
}
#
# From name and address:
#
do {
my $addr = OP::EmailAddr->new("Rewt", 'root@example.com');
}
#
# From a formatted string:
#
do {
my $addr = OP::EmailAddr->new("Rewt <root@example.com>');
}
DESCRIPTION
Extends Email::Address, OP::Array. Uses Data::Validate::Email to verify input.
PUBLIC CLASS METHODS
assert(OP::Class $class: *@rules)
Returns a new OP::Type::EmailAddr instance which encapsulates the received OP::Subtype rules.
create "OP::Example" => { someAddr => OP::EmailAddr->assert(optional()), # ... };
new(OP::Class $class: Str $addr)
Returns a new OP::EmailAddr instance which encapsulates the received value.
my $object = OP::EmailAddr->new('root@example.com');
SEE ALSO
See Email::Address for RFC-related methods inherited by this class.
OP::Array, Data::Validate::Email
This file is part of OP.