summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-07-16 12:25:07 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-07-16 12:25:07 +0000
commit3a6b268dfb0ee30ac0bbaee8f809c2b133695d8f (patch)
treee1f1c867f1b695bc857ab1d5d9ccd09a343b9ad8 /lib
parent54725af65d49b2ed8413041530c71b8d3bde0714 (diff)
downloadperl-3a6b268dfb0ee30ac0bbaee8f809c2b133695d8f.tar.gz
Upgrade to Locale::Codes 2.06.
p4raw-id: //depot/perl@17571
Diffstat (limited to 'lib')
-rw-r--r--lib/Locale/Codes/ChangeLog17
-rw-r--r--lib/Locale/Codes/README2
-rw-r--r--lib/Locale/Country.pm33
-rw-r--r--lib/Locale/Country.pod4
-rw-r--r--lib/Locale/Currency.pm6
-rw-r--r--lib/Locale/Language.pm7
-rw-r--r--lib/Locale/Script.pm6
7 files changed, 49 insertions, 26 deletions
diff --git a/lib/Locale/Codes/ChangeLog b/lib/Locale/Codes/ChangeLog
index 1f836f0fc7..4d8ac19e1d 100644
--- a/lib/Locale/Codes/ChangeLog
+++ b/lib/Locale/Codes/ChangeLog
@@ -1,6 +1,23 @@
ChangeLog for Locale-Codes Distribution
+2.06 2002-07-15 neilb
+
+ * The four modules which have data after __DATA__ weren't
+ closing the DATA filehandle after reading from it,
+ which they should. Bug and patch from Steve Hay.
+
+2.05 2002-07-08 neilb
+
+ * Added three letter codes for the countries that were missing
+ them. Patch from TJ Mather.
+ * Documentation bug: one of the examples used => where the
+ lvalue was a constant, which isn't allowed, unless you
+ put the () with the constant to force the right interpretation.
+ Pointed out by TJ Mather and MYT.
+ * Updated the URL for the appendix in the CIA world factbook.
+ Patch from TJ Mather.
+
2.04 2002-05-23 neilb
* updated according to changes in ISO 3166-1 described
diff --git a/lib/Locale/Codes/README b/lib/Locale/Codes/README
index 012ee4a7a9..8dbba6492b 100644
--- a/lib/Locale/Codes/README
+++ b/lib/Locale/Codes/README
@@ -1,6 +1,6 @@
Locale-Codes Distribution
- v2.03
+ v2.06
This distribution contains four Perl modules which can be used to process
ISO codes for identifying languages, countries, scripts,
diff --git a/lib/Locale/Country.pm b/lib/Locale/Country.pm
index fd7fcec9b2..07ae83325c 100644
--- a/lib/Locale/Country.pm
+++ b/lib/Locale/Country.pm
@@ -1,7 +1,7 @@
#
# Locale::Country - ISO codes for country identification (ISO 3166)
#
-# $Id: Country.pm,v 2.4 2002/05/20 05:05:18 neilb Exp $
+# $Id: Country.pm,v 2.6 2002/07/10 16:33:27 neilb Exp $
#
package Locale::Country;
@@ -17,7 +17,7 @@ use Locale::Constants;
# Public Global Variables
#-----------------------------------------------------------------------
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = sprintf("%d.%02d", q$Revision: 2.4 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.6 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Exporter);
@EXPORT = qw(code2country country2code
all_country_codes all_country_names
@@ -299,6 +299,8 @@ sub _code2codeset
}
}
+
+ close(DATA);
}
1;
@@ -313,7 +315,7 @@ al:alb:008:Albania
am:arm:051:Armenia
an:ant:530:Netherlands Antilles
ao:ago:024:Angola
-aq:::Antarctica
+aq:ata:010:Antarctica
ar:arg:032:Argentina
as:asm:016:American Samoa
at:aut:040:Austria
@@ -335,15 +337,14 @@ bo:bol:068:Bolivia
br:bra:076:Brazil
bs:bhs:044:Bahamas
bt:btn:064:Bhutan
-bv:::Bouvet Island
+bv:bvt:074:Bouvet Island
bw:bwa:072:Botswana
by:blr:112:Belarus
bz:blz:084:Belize
ca:can:124:Canada
-cc:::Cocos (Keeling) Islands
-cd:cod:180:Congo, The Democratic Republic of the:Congo, Democratic Republic of the
+cc:cck:166:Cocos (Keeling) Islands
cf:caf:140:Central African Republic
-cg:cog:178:Congo
+cg:cog:178:Congo:Congo, Republic of the
ch:che:756:Switzerland
ci:civ:384:Cote D'Ivoire
ck:cok:184:Cook Islands
@@ -354,7 +355,7 @@ co:col:170:Colombia
cr:cri:188:Costa Rica
cu:cub:192:Cuba
cv:cpv:132:Cape Verde
-cx:::Christmas Island
+cx:cxr:162:Christmas Island
cy:cyp:196:Cyprus
cz:cze:203:Czech Republic
de:deu:276:Germany
@@ -376,7 +377,7 @@ fk:flk:238:Falkland Islands (Malvinas):Falkland Islands (Islas Malvinas)
fm:fsm:583:Micronesia, Federated States of
fo:fro:234:Faroe Islands
fr:fra:250:France
-fx:::France, Metropolitan
+fx:fxx:249:France, Metropolitan
ga:gab:266:Gabon
gb:gbr:826:United Kingdom:Great Britain
gd:grd:308:Grenada
@@ -390,13 +391,13 @@ gn:gin:324:Guinea
gp:glp:312:Guadeloupe
gq:gnq:226:Equatorial Guinea
gr:grc:300:Greece
-gs:::South Georgia and the South Sandwich Islands
+gs:sgs:239:South Georgia and the South Sandwich Islands
gt:gtm:320:Guatemala
gu:gum:316:Guam
gw:gnb:624:Guinea-Bissau
gy:guy:328:Guyana
hk:hkg:344:Hong Kong
-hm:::Heard Island and McDonald Islands
+hm:hmd:334:Heard Island and McDonald Islands
hn:hnd:340:Honduras
hr:hrv:191:Croatia
ht:hti:332:Haiti
@@ -405,7 +406,7 @@ id:idn:360:Indonesia
ie:irl:372:Ireland
il:isr:376:Israel
in:ind:356:India
-io:::British Indian Ocean Territory
+io:iot:086:British Indian Ocean Territory
iq:irq:368:Iraq
ir:irn:364:Iran, Islamic Republic of:Iran
is:isl:352:Iceland
@@ -509,7 +510,7 @@ sy:syr:760:Syrian Arab Republic:Syria
sz:swz:748:Swaziland
tc:tca:796:Turks and Caicos Islands
td:tcd:148:Chad
-tf:::French Southern Territories
+tf:atf:260:French Southern Territories
tg:tgo:768:Togo
th:tha:764:Thailand
tj:tjk:762:Tajikistan
@@ -525,7 +526,7 @@ tw:twn:158:Taiwan, Province of China:Taiwan
tz:tza:834:Tanzania, United Republic of:Tanzania
ua:ukr:804:Ukraine
ug:uga:800:Uganda
-um:::United States Minor Outlying Islands
+um:umi:581:United States Minor Outlying Islands
us:usa:840:United States:USA:United States of America
uy:ury:858:Uruguay
uz:uzb:860:Uzbekistan
@@ -539,9 +540,9 @@ vu:vut:548:Vanuatu
wf:wlf:876:Wallis and Futuna
ws:wsm:882:Samoa
ye:yem:887:Yemen
-yt:::Mayotte
+yt:myt:175:Mayotte
yu:yug:891:Yugoslavia
za:zaf:710:South Africa
zm:zmb:894:Zambia
-zr:::Zaire
+zr:zar:180:Zaire:Congo, The Democratic Republic of the:Congo, Democratic Republic of the
zw:zwe:716:Zimbabwe
diff --git a/lib/Locale/Country.pod b/lib/Locale/Country.pod
index ff130aadc0..3716eacbfa 100644
--- a/lib/Locale/Country.pod
+++ b/lib/Locale/Country.pod
@@ -104,7 +104,7 @@ This function takes a country code from one code set,
and returns the corresponding code from another code set.
$alpha2 = country_code2code('fin',
- LOCALE_CODE_ALPHA_3 => LOCALE_CODE_ALPHA_2);
+ LOCALE_CODE_ALPHA_3, LOCALE_CODE_ALPHA_2);
# $alpha2 will now be 'fi'
If the code passed is not a valid country code in
@@ -281,7 +281,7 @@ Official home page for the ISO 3166 maintenance agency.
Another useful, but not official, home page.
-=item http://www.cia.gov/cia/publications/factbook/docs/app-f.html
+=item http://www.cia.gov/cia/publications/factbook/docs/app-d-1.html
An appendix in the CIA world fact book which lists country codes
as defined by ISO 3166, FIPS 10-4, and internet domain names.
diff --git a/lib/Locale/Currency.pm b/lib/Locale/Currency.pm
index f8efffbe85..34b85917dd 100644
--- a/lib/Locale/Currency.pm
+++ b/lib/Locale/Currency.pm
@@ -2,7 +2,7 @@
# Locale::Currency - ISO three letter codes for currency identification
# (ISO 4217)
#
-# $Id: Currency.pm,v 2.1 2002/02/06 04:07:10 neilb Exp $
+# $Id: Currency.pm,v 2.2 2002/07/10 16:33:27 neilb Exp $
#
package Locale::Currency;
@@ -15,7 +15,7 @@ require Exporter;
# Public Global Variables
#-----------------------------------------------------------------------
use vars qw($VERSION @ISA @EXPORT);
-$VERSION = sprintf("%d.%02d", q$Revision: 2.1 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.2 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Exporter);
@EXPORT = qw(&code2currency &currency2code
&all_currency_codes &all_currency_names );
@@ -117,6 +117,8 @@ sub all_currency_names
$CODES{$code} = $currency;
$CURRENCIES{"\L$currency"} = $code;
}
+
+ close(DATA);
}
1;
diff --git a/lib/Locale/Language.pm b/lib/Locale/Language.pm
index a00559f94b..f47e523fc2 100644
--- a/lib/Locale/Language.pm
+++ b/lib/Locale/Language.pm
@@ -1,7 +1,7 @@
#
# Locale::Language - ISO two letter codes for language identification (ISO 639)
#
-# $Id: Language.pm,v 2.1 2002/02/06 04:07:10 neilb Exp $
+# $Id: Language.pm,v 2.2 2002/07/10 16:33:27 neilb Exp $
#
package Locale::Language;
@@ -14,7 +14,7 @@ require Exporter;
# Public Global Variables
#-----------------------------------------------------------------------
use vars qw($VERSION @ISA @EXPORT);
-$VERSION = sprintf("%d.%02d", q$Revision: 2.1 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.2 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Exporter);
@EXPORT = qw(&code2language &language2code
&all_language_codes &all_language_names );
@@ -107,7 +107,6 @@ sub all_language_names
my $code;
my $language;
- use bytes;
while (<DATA>)
{
@@ -117,6 +116,8 @@ sub all_language_names
$CODES{$code} = $language;
$LANGUAGES{"\L$language"} = $code;
}
+
+ close(DATA);
}
1;
diff --git a/lib/Locale/Script.pm b/lib/Locale/Script.pm
index 6b75afbc07..d5b6751a1a 100644
--- a/lib/Locale/Script.pm
+++ b/lib/Locale/Script.pm
@@ -1,7 +1,7 @@
#
# Locale::Script - ISO codes for script identification (ISO 15924)
#
-# $Id: Script.pm,v 2.1 2002/02/06 04:07:10 neilb Exp $
+# $Id: Script.pm,v 2.2 2002/07/10 16:33:28 neilb Exp $
#
package Locale::Script;
@@ -17,7 +17,7 @@ use Locale::Constants;
# Public Global Variables
#-----------------------------------------------------------------------
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = sprintf("%d.%02d", q$Revision: 2.1 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.2 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Exporter);
@EXPORT = qw(code2script script2code
all_script_codes all_script_names
@@ -183,6 +183,8 @@ sub all_script_names
}
}
+
+ close(DATA);
}
1;