This queue is for tickets about the Locale-SubCountry CPAN distribution.

Report information
The Basics
Id:
32899
Status:
resolved
Priority:
Low/Low

People
Owner:
kimryan [...] cpan.org
Requestors:
TJMATHER [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Normal
Broken in:
(no value)
Fixed in:
(no value)



Subject: Patch to add FIPS codes for UK
The attached patch adds support for United Kingdom FIPS 10-4 codes. I used the following Perl code to modify SubCountry.pm (I'm attaching here in case it is useful to someone else how wants to add FIPS codes for another country) my %fips; # UKFIPS is CSV version of data from this page: http://www.statoids.com/ugb.html open my $fh, "UKFIPS.csv"; while (<$fh>) { s!"!!g; my ($iso, $fips) = split(","); print "$iso -> $fips\n"; $fips =~ s!^UK!!; $fips{$iso} = $fips; } open my $fh, "/usr/lib/perl5/site_perl/5.8.7/Locale/SubCountry.pm"; open my $out, ">SubCountry.pm"; my $in_uk; while (<$fh>) { print $out $_; if (m!<name>UNITED KINGDOM</name>!) { $in_uk = 1; } if (m!</country>!) { $in_uk = 0; } if ($in_uk) { if (m!<code>(\w+)</code>!) { my $fips = $fips{$1}; if ($fips) { print $out " <FIPS>$fips</FIPS>\n"; } } } }
Subject: fips_uk.patch

Message body is not shown because it is too large.

Added FIPS codes for UK. Resolved in version 1.41, April 2008.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.