Cory G Watson > Geo-Address-Mail-Standardizer-USPS-0.03 > Geo::Address::Mail::Standardizer::USPS



Annotate this POD

View/Report Bugs
Module Version: 0.03   Source  


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

    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.

USPS Postal Address Standards Implemented ^

This module currently handles the following sections from Publication 28:

212 Format

213.1 Common Designators

Also, Appendix C1

Also, Appendix C2

222 Punctuation

Punctuation is removed from all fields except postal_code. Note that this isn't really kosher when using address ranges...

211 Standardized Delivery Address Line and Last Line

The state field values are translated to their abbreviated form, as given in Appendix B.

225.1 Overseas Locations

Overseas military addresses translate the state field as given in Appendix B.


Cory G Watson, <gphat at>


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 for more information.

syntax highlighting: