Data::Transpose::EmailValid - Perl extension to check if a mail is valid (with some autocorrection)
use Data::Transpose::EmailValid; my $email = Data::Transpose::EmailValid->new; ok($email->is_valid("user@domain.tld"), "Mail is valid"); ok(!$email->is_valid("user_e;@domain.tld"), "Mail is not valid"); warn $email->reason; # output the reason of the failure
This module check if the mail is valid, using the Email::Valid module. It also provides some additional methods.
Constructor. It doesn't accept any arguments.
Accessor to the Email::Valid object
Accessor to the input email string.
Accessor to the output email string.
Clear all the internal data
Returns the email passed if valid, false underwise.
Returns the last checked email.
Returns the reason of the failure of the last check, false if it was successful.
This module implements some basic autocorrection. Calling ->suggestion after a successfull test, will return the suggested value if the input was different from the output, false otherwise.
Uwe Voelker <uwe@uwevoelker.de>
Copyright 2012-2013 Uwe Voelker <uwe@uwevoelker.de>.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Data::Transpose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Transpose
CPAN shell
perl -MCPAN -e shell install Data::Transpose
For more information on module installation, please visit the detailed CPAN module installation guide.