Busine...eLookup(3pm)
πΈ NAME πΈ
Business::US::USPS::WebTools::ZipCodeLookup β bestie, this is the module that looks up a Zip Code using the USPS Web Tools. It's the Busine...eLookup(3pm) page, in case you were wondering where you wandered in from π
β¨ SYNOPSIS β¨
okay so here's the whole vibe in one go:
use Business::US::USPS::WebTools::ZipCodeLookup;
my $looker_upper = Business::US::USPS::WebTools::ZipCodeLookup->new( {
UserID => $ENV{USPS_WEBTOOLS_USERID},
Password => $ENV{USPS_WEBTOOLS_PASSWORD},
Testing => 1,
} );
my $hash = $looker_upper->lookup_zipcode(
);
if( $looker_upper->is_error )
{
warn "Oh No! $looker_upper->{error}{description}\n";
}
else
{
print join "\n", map { "$_: $hash->{$_}" }
qw(FirmName Address1 Address2 City State Zip5 Zip4);
}
π DESCRIPTION π
* THIS IS ALPHA SOFTWARE *
Like. ALPHA. As in, she's cute but she's still figuring herself out, so don't put her in production and then act surprised π
This module implements the Zip Code Lookup web service from the US Postal Service. It is a subclass of Business::US::USPS::WebTools. Family tree realness π
π lookup_zipcode( KEY, VALUE, ... ) π
The lookup_zipcode method takes the following keys, which come directly from the USPS web service interface β no middleman, no reinterpretation, just exactly what USPS wants:
Address2β the street addressCityβ the name of the cityStateβ the two letter state abbreviationZip5β the 5 digit zip codeZip4β the 4 digit extension to the zip code
It returns an anonymous hash with the same keys, but the values are the USPS's canonicalized address (so like, glow-up version of what you sent in β¨). If there is an error, the hash values will be the empty string, and the error flag is set. Check is with is_error:
$verifier->is_error;
See the is_error documentation in Business::US::USPS::WebTools for more details on error information. (Yes bestie, go read the parent's docs, she knows things π)
π¦ TO DO π¦
(no cap, this section is literally empty in the original β she's a work in progress and that's okay π)
β SEE ALSO β
Business::US::USPS::WebTools
The WebTools API is documented on the US Postal Service's website:
http://www.usps.com/webtools/htm/Address-Information.htm
πΈ SOURCE AVAILABILITY πΈ
This source is in GitHub:
https://github.com/ssimms/business-us-usps-webtools
Go star it, it's giving open source royalty π
π AUTHOR π
brian d foy
π COPYRIGHT AND LICENSE π
Copyright Β© 2020, 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, periodt π
this was Busine...eLookup(3pm) from the User Contributed Perl Documentation, running under perl v5.36.0 and last touched on 2022-08-28 β slay, stay hydrated, and read your error flags π«Άπ
π¦ 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