Subject: | PO Box parsing issue |
Date: | Fri, 7 Mar 2014 12:22:24 -0500 |
To: | <bug-Geo-StreetAddress-US [...] rt.cpan.org> |
From: | "Cole Smith" <csmith [...] seanc.org> |
Hello!
Module Version: 1.04
Perl Version: 5.16
I'm noticing a couple different incorrect behaviors when attempting to
parse addresses with PO Boxes and no other street data, using
parse_location().
The first occurs when the city's name is more than one word; it will
split the city name and use the first token as the Street and the second
token as the City. About 2/3 of my test cases (numbering in the
hundreds) fall into this category.
Examples:
# City name is two words, split into street address
PO Box 100,Fuquay Varina NC 27526 => {
'sec_unit_num' => '100',
'city' => 'Varina',
'zip' => '27526',
'street' => 'Fuquay',
'sec_unit_type' => 'PO Box',
'type' => '',
'state' => 'NC'
};
PO Box 100,New Bern NC 28561 => {
'sec_unit_num' => '100',
'city' => 'Bern',
'zip' => '28561',
'street' => 'New',
'sec_unit_type' => 'PO Box',
'type' => '',
'state' => 'NC'
};
The second case involves the state being parsed as the city, and the
city as the street. The remaining third of my test cases fall into this
category.
Examples:
# State as City, City as Street
PO Box 100,Shelby NC 28151 => {
'sec_unit_num' => '100',
'city' => 'NC',
'street' => 'Shelby',
'sec_unit_type' => 'PO Box',
'type' => ''
};
PO Box 100,Hildebran NC 28637 => {
'sec_unit_num' => '100',
'city' => 'NC',
'street' => 'Hildebran',
'sec_unit_type' => 'PO Box',
'type' => ''
};