Busine...zation(3pm)
π Business::US::USPS::WebTools::AddressStandardization β canonicalize a US address π
okay bestie, so this little page is Business::US::USPS::WebTools::AddressStandardization(3pm), part of the User Contributed Perl Documentation, and it's here to make US addresses look β¨correctβ¨.
πΈ NAME πΈ
Business::US::USPS::WebTools::AddressStandardization β canonicalize a US address. that's it, that's the whole job, and it eats π«Ά
β¨ SYNOPSIS β¨
here's the vibe, no cap:
use Business::US::USPS::WebTools::AddressStandardization;
my $verifier = Business::US::USPS::WebTools::AddressStandardization->new( {
UserID => $ENV{USPS_WEBTOOLS_USERID},
Password => $ENV{USPS_WEBTOOLS_PASSWORD},
Testing => 1,
} );
my $hash = $verifier->verify_address(
FirmName => '',
Address1 => '',
Address2 => '6406 Ivy Lane',
City => 'Greenbelt',
State => 'MD',
Zip5 => '',
Zip4 => '',
);
if( $verifier->is_error )
{
warn "Oh No! $verifier->{error}{description}\n";
}
else
{
print join "\n", map { "$_: $hash->{$_}" }
qw(FirmName Address1 Address2 City State Zip5 Zip4 DeliveryPoint CarrierRoute ReturnText);
}
likeβ¦ you build the thing, you hand it an address, you check if it errored, and if not you print the glow-up version. iconic behavior honestly π
π DESCRIPTION π
* THIS IS ALPHA SOFTWARE *
okay first things first, huge disclaimer energy: this is alpha software, so treat it like a friend who's almost done getting ready. π
So this module implements the Address Standardization web service from the US Postal Service. It's a subclass of Business::US::USPS::WebTools, meaning it inherits all the base-class behavior and just adds the address-verification glow-up on top. π
π verify_address( KEY, VALUE, ... )
The verify_address method takes the following keys β and these come directly from the USPS web service interface, so no funny business, we keep them exactly as-is:
FirmName The name of the company
Address1 The suite or apartment
Address2 The street address
City The name of the city
State The two letter state abbreviation
Zip5 The 5 digit ZIP code
Zip4 The 4 digit extension to the ZIP code
It returns an anonymous hash with the same keys, but the values are now the USPS's canonicalized address β plus three bonus keys because we love a little extra:
DeliveryPoint The 2 digit extension to the ZIP+4 code
CarrierRoute The 4 character postal carrier route
ReturnText An error message when multiple addresses are found
now if something goes wrong? the hash values will be the empty string, and the error flag is set. check on it with is_error:
$verifier->is_error;
and for the full tea on error information, go read the is_error documentation over in Business::US::USPS::WebTools. it's all there, fr fr.
π TO DO π
...nothing here bestie, this section is literally empty. the to-do list is a blank notebook. we support that. π
π₯ SEE ALSO π₯
Business::US::USPS::WebTools
The WebTools API is documented on the US Postal Service's website:
https://www.usps.com/business/web-tools-apis/address-information-api.pdf
π¦ SOURCE AVAILABILITY π¦
This source is in GitHub:
https://github.com/ssimms/business-us-usps-webtools
go clone it, go read it, go slay π
π AUTHOR π
brian d foy
π§ MAINTAINER π§
Steve Simms
π COPYRIGHT AND LICENSE π
Copyright Β© Steve Simms. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.
and that's the whole page, bestie β¨ this was perl v5.36.0 energy, dated 2022-08-28, straight out of the Busine...zation(3pm) corner of the docs. stay canonicalized ππ«ΆπΈ
π¦ where this page comes from
- ubuntu noble: libbusiness-us-usps-webtools-perl 1.125-2 Β· Artistic-2.0
- ubuntu resolute: libbusiness-us-usps-webtools-perl 1.125-2 Β· Artistic-2.0
- ubuntu stonking: libbusiness-us-usps-webtools-perl 1.125-2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms