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("firstname.lastname@example.org"), "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.
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 <email@example.com>
Copyright 2012-2013 Uwe Voelker <firstname.lastname@example.org>.
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.