Busine...eLookup(3pm)
π Busine...eLookup(3pm) β aka Business::US::USPS::WebTools::CityStateLookup π
okay bestie, gather round, because this is a User Contributed Perl Documentation page and it's lowkey iconic. It's giving "I can look up a City and State from a Zip Code and I will not be normal about it." β¨
πΈ NAME πΈ
Business::US::USPS::WebTools::CityStateLookup β lookup a City and State by Zip Code. periodt. π
π¦ SYNOPSIS π¦
no thoughts, just vibes, and also this exact code:
use Business::US::USPS::WebTools::AddressStandardization;
my $looker_upper = Business::US::USPS::WebTools::CityStateLookup->new( {
UserID => $ENV{USPS_WEBTOOLS_USERID},
Password => $ENV{USPS_WEBTOOLS_PASSWORD},
Testing => 1,
} );
my $hash = $looker_upper->lookup_city_state(
);
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);
}
notice how the warn literally says Oh No! β the author is one of us, fr fr. ππ
π DESCRIPTION π
* THIS IS ALPHA SOFTWARE *
okay so, heads up bestie: * THIS IS ALPHA SOFTWARE *. That's not me being dramatic, that's the actual page. Alpha. Be normal about it. π
This module implements the Address Standardization web service from the US Postal Service. And plot twist β it is a subclass of Business::US::USPS::WebTools. π«Ά
lookup_city_state( KEY, VALUE, ... )
The verify_address method takes the following keys, which come directly from the USPS web service interface:
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
(yes, the heading says lookup_city_state and the sentence says verify_address. that's canon. I don't make the rules, I just report them. π
)
It returns an anonymous hash with the same keys, but the values are the USPS's canonicalized address β canonicalized, slay. 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. π
π TO DO π
...nothing. literally nothing. the section is there and it is empty. it's giving mysterious. it's giving "we'll get to it." iconic honestly. β¨
π 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 star it bestie, it's the least you can do π«Ά
π AUTHOR π
brian d foy
π§ MAINTAINER π§
Steve Simms
π 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, no notes. this was perl v5.36.0, dated 2022-08-28, filed under Busine...eLookup(3pm). mwah. πβ¨
π¦ 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