Subject: | full state names with spaces (e.g., "New York") not matched |
Date: | Thu, 18 Oct 2007 17:13:51 -0500 |
To: | bug-Geo-StreetAddress-US [...] rt.cpan.org |
From: | Nate Blaylock <blaylock [...] ihmc.us> |
Hi,
in Geo-StreetAddress-US-0.99, addresses which contain the full name of
states with spaces in them do not match. For example
123 Maple Rochester, New York
It turns out the spaces aren't being escaped and then being used in an
'x' regex environment.
To fix the problem, substitute line 687 of US.pm:
state => join("|",%State_Code),
with
state => join("|",
# escape spaces in state names (e.g., "new york" --> "new\\
york")
# so they still match in the x environment below
map { ( quotemeta $_) } keys %State_Code,
values %State_Code),
thanks for a great tool,
nate