Geo::Address::Mail::Standardizer::USPS - Offline implementation of USPS Postal Addressing Standards
This module provides an offline implementation of the USPS Publication 28 - Postal Addressing Standards as defined by http://pe.usps.com/text/pub28/welcome.htm.
my $std = Geo::Address::Mail::Standardizer::USPS->new; my $address = Geo::Address::Mail::US->new( name => 'Test Testerson', street => '123 Test Street', street2 => 'Apartment #2', city => 'Testville', state => 'TN', postal_code => '12345' ); my $res = $std->standardize($address); my $corr = $res->standardized_address;
This module is not a complete implementation of USPS Publication 28. It intends to be, but that will probably take a while. In the meantime it may be useful for testing or for pseudo-standardizaton.
This module currently handles the following sections from Publication 28:
Also, Appendix C1
Also, Appendix C2
Punctuation is removed from all fields except
postal_code. Note that this isn't really kosher when using address ranges...
state field values are translated to their abbreviated form, as given in Appendix B.
Overseas military addresses translate the
state field as given in Appendix B.
Cory G Watson,
<gphat at cpan.org>
Copyright 2010 Cory G Watson.
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.