RFC::RFC822::Address is a Perl module for RFC 822 style address validation.
use RFC::RFC822::Address qw /valid/;
print "Validn" if valid 'email@example.com';
This module checks strings to see whether they are have the valid syntax, as defined in RFC 822 . One subroutine, valid, can be imported, which takes a single string as argument. If the string is valid according to RFC 822, a true value is returned, else a false value is returned.
CAVEATS and BUGS
This module sets the variable $Parse::RecDescent::skip. This will influence all other Parse::RecDescent parsers. And this parser will break if you set $Parse::RecDescent::skip to another value. It doesn't look that it is possible to set an alternative skip value for each parser, other than setting the skip value on each production.
Example A.1.5 in RFC 822 is wrong. It should use "Galloping Gourmet"@ANT.Down-Under.
This module should have been named RFC::822::Address. However, perl 5.004 doesn't like the 822 part, and at the time of this writing MacPerl is still at 5.004.
This module is slow.
What's New in This Release:
· Changed group rule to make < leftop > part greedy. (Damian Conway/Douglas Wilson)
· Added a test; removed $DEBUG part, now prints message on failures.
· Changed wording of license (using BSD/X style).