Skip Menu |

This queue is for tickets about the Geo-StreetAddress-US CPAN distribution.

Report information
The Basics
Id: 93616
Status: open
Priority: 0/
Queue: Geo-StreetAddress-US

People
Owner: Nobody in particular
Requestors: csmith [...] seanc.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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' => '' };
Thanks for the report. I'm unlikely to work on this for a while, so I'd welcome a patch (with tests). I'd also be happy to give you co-maint status on, or ownership of, the module if you're interested.
From: Dan
I have a load of test cases that fail with the PO BOX so if you need data to work with I can provide them. More often than not, I end up with the state placed in the city and the city placed in the street and the PO BOX info getting stuffed into the sec_unit_* fields.