| 1 | package Locale::Places::US; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use Database::Abstraction; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | Locale::Places::US | ||
| 10 | |||
| 11 | =head1 VERSION | ||
| 12 | |||
| 13 | Version 0.17 | ||
| 14 | |||
| 15 | =cut | ||
| 16 | |||
| 17 | 1 | our $VERSION = '0.17'; | |
| 18 | |||
| 19 | # From http://download.geonames.org/export/dump/readme.txt | ||
| 20 | # alternateNameId : the id of this alternate name, int | ||
| 21 | # geonameid : geonameId referring to id in table 'geoname', int | ||
| 22 | # isolanguage : iso 639 language code 2- or 3-characters; 4-characters 'post' for postal codes and 'iata','icao' and faac for airport codes, fr_1793 for French Revolution names, abbr for abbreviation, link to a website (mostly to wikipedia), wkdt for the wikidataid, varchar(7) | ||
| 23 | # alternate name : alternate name or name variant, varchar(400) | ||
| 24 | # isPreferredName : '1', if this alternate name is an official/preferred name | ||
| 25 | # isShortName : '1', if this is a short name like 'California' for 'State of California' | ||
| 26 | # isColloquial : '1', if this alternate name is a colloquial or slang term. Example: 'Big Apple' for 'New York'. | ||
| 27 | # isHistoric : '1', if this alternate name is historic and was used in the past. Example 'Bombay' for 'Mumbai'. | ||
| 28 | # from : from period when the name was used | ||
| 29 | # to : to period when the name was used | ||
| 30 | |||
| 31 | # US.csv is from http://download.geonames.org/export/dump/alternatenames/US.zip | ||
| 32 | |||
| 33 | 1 | our @ISA = ('Database::Abstraction'); | |
| 34 | |||
| 35 | # If there's no SQLite file, fall back to the original CSV file, that's when the arguments to _open will be used | ||
| 36 | 0 | ▶ | sub _open { |
|
Subroutine
_open: not called CC=1 SCAR=6.9
| |||
| 37 | 0 | my $self = shift; | |
| 38 | |||
| 39 | 0 | return $self->SUPER::_open(sep_char => "\t", column_names => ['code1','code2','type','data','ispreferredname','isshortname']); | |
| 40 | } | ||
| 41 | |||
| 42 | 1 | 1; | |