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:
http://pe.usps.com/text/pub28/pub28c2_002.htm
http://pe.usps.com/text/pub28/pub28c2_003.htm
Also, Appendix C1
http://pe.usps.com/text/pub28/pub28apc_002.html
Also, Appendix C2
http://pe.usps.com/text/pub28/pub28apc_003.htm#ep538629
Punctuation is removed from all fields except postal_code. Note that this isn't really kosher when using address ranges...
postal_code
http://pe.usps.com/text/pub28/pub28c2_007.htm
The state field values are translated to their abbreviated form, as given in Appendix B.
state
http://pe.usps.com/text/pub28/pub28apb.htm
Overseas military addresses translate the state field as given in Appendix B.
http://pe.usps.com/text/pub28/pub28c2_010.htm
Cory G Watson, <gphat at cpan.org>
<gphat at cpan.org>
Albert Croft
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.
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
To install Geo::Address::Mail::Standardizer::USPS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Address::Mail::Standardizer::USPS
CPAN shell
perl -MCPAN -e shell install Geo::Address::Mail::Standardizer::USPS
For more information on module installation, please visit the detailed CPAN module installation guide.