Stefan Hornburg (Racke) > Data-Transpose-0.0003 > Data::Transpose::EmailValid

Download:
Data-Transpose-0.0003.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source   Latest Release: Data-Transpose-0.0010

NAME ^

Data::Transpose::EmailValid - Perl extension to check if a mail is valid (with some autocorrection)

SYNOPSIS ^

  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

DESCRIPTION ^

This module check if the mail is valid, using the Email::Valid module. It also provides some additional methods.

METHODS ^

new

Constructor. It doesn't accept any arguments.

$obj->is_valid($emailstring);

Returns the email passed if valid, false underwise.

$obj->email

Returns the last checked email.

$obj->reason

Returns the reason of the failure of the last check, false if it was successful.

$obj->suggestion

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.

AUTHOR ^

Uwe Voelker <uwe@uwevoelker.de>

LICENSE AND COPYRIGHT ^

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.

syntax highlighting: