MooseX::Types::EmailAddress - Valid email address type constraint for Moose.
This documentation refers to MooseX::Types::EmailAddress version 1.1.2
package FooBar; use Moose; use MooseX::Types::EmailAddress qw/EmailAddress EmailAddressList/; use namespace::autoclean; has address => ( isa => EmailAddress, required => 1, is => "ro" ); has addrlist => ( traits => ["Array"], is => "ro", isa => EmailAddressList, coerce => 1, default => sub { [] }, handles => { "addr_count" => "count", } );
This module provides Moose type constraints for valid email addresses. There is support for a type which represents a single valid email address and a type which represents a list of valid email addresses. The validation is done using the Email::Valid module.
This module is similar to MooseX::Types::Email but deliberately focuses only on email addresses. This module also provides an additional type to handle lists of addresses.
This module requires MooseX::Types to build the Moose types. It uses Email::Valid to check if a string is a valid email address. It also uses Email::Address for parsing and splitting strings which might contain more than one address into a list.
Moose, Moose::Util::TypeConstraints, MooseX::Types::Email
This is the list of platforms on which we have tested this software. We expect this software to work on any Unix-like platform which is supported by Perl.
ScientificLinux6
If you find a bug please either email the author, or add the bug to cpan-RT http://rt.cpan.org.
Stephen Quinney <squinney@inf.ed.ac.uk>
<squinney@inf.ed.ac.uk>
Copyright (C) 2012-2013 University of Edinburgh. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GPL, version 2 or later.
To install MooseX::Types::EmailAddress, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Types::EmailAddress
CPAN shell
perl -MCPAN -e shell install MooseX::Types::EmailAddress
For more information on module installation, please visit the detailed CPAN module installation guide.