Skip Menu |

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

Report information
The Basics
Id: 73397
Status: resolved
Priority: 0/
Queue: Geo-StreetAddress-US

People
Owner: Nobody in particular
Requestors: rxtreme [...] gmail.com
Cc:
AdminCc:

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



Subject: Parsed addresses fail to trim whitespace
Parsed addresses fail to trim whitespace. If I use parse_informal_address() to parse both "5800 Santa Rosa Rd, Ste 143" and ""5800 Santa Rosa Rd Ste 143", they will return different values in the street field (strings that do not compare equal). Trimming the returned string will solve this issue. Similar examples that fail to match: "3865 General Degaulle Dr, Ste B" "3865 General Degaulle Dr Ste A", "45 Quaker Ave, Ste 105", "45 Quaker Ave Ste 105" Version: Geo-StreetAddress-US-1.02 Perl v5.10.1 OS: Windows 7, but running CYGWIN_NT-6.1
From: rxtreme [...] gmail.com
Clarification: The problem occurs when the quotation marks are part of the string. (In Perl, you could represent the examples as '"5800 Santa Rosa Rd Ste 143"') The program parses the address correctly but leaves whitespace in place of the quotation marks. On Tue Dec 20 18:46:00 2011, Rand wrote: Show quoted text
> Parsed addresses fail to trim whitespace. > > If I use parse_informal_address() to parse both "5800 Santa Rosa Rd,
Ste Show quoted text
> 143" and ""5800 Santa Rosa Rd Ste 143", they will return different > values in the street field (strings that do not compare equal). > > Trimming the returned string will solve this issue. > > Similar examples that fail to match: > "3865 General Degaulle Dr, Ste B" > "3865 General Degaulle Dr Ste A", > "45 Quaker Ave, Ste 105", > "45 Quaker Ave Ste 105" > > Version: Geo-StreetAddress-US-1.02 > Perl v5.10.1 > OS: Windows 7, but running CYGWIN_NT-6.1
Hi, thanks for the report. I'm not really maintaining this module anymore, but if you send patches, I'll apply them.
I'm not entirely clear what the issue is here, but I've added a test case that seems to work fine. https://github.com/timbunce/Geo-StreetAddress-US/commit/07fc61124f431d4ecd76cd4325fead9488b45df7 So I'm resolving this case. If it's not doing the right thing please reply with a test case. Thanks.