Geo::PostalCode::InstallDB - Create and install a new location database for Geo::PostalCode.
use Geo::PostalCode::InstallDB; Geo::PostalCode::InstallDB->install(zipdata => 'Geo-PostalCode_19991101.txt', db_dir => '.') or die "Couldn't install DB!\n";
This class contains only one useful method: install. It takes a text file, the name of which should be given in the zipdata parameter, and converts it into three Berkeley database files (postalcode.db, latlon.db, and city.db) which will be installed in the directory given as the db_dir parameter.
install
zipdata
db_dir
The format of these files is a series of lines, the first of which is skipped. Each has five tab-seperated values:
postal_code lat lon city state
Geo::PostalCode, http://www.census.gov/geo/www/tiger/zip1999.html.
To install Geo::PostalCode, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::PostalCode
CPAN shell
perl -MCPAN -e shell install Geo::PostalCode
For more information on module installation, please visit the detailed CPAN module installation guide.