From 463971a7f09119922cecde3004581bfdc81b4388 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 24 Jan 2015 23:35:30 +0100 Subject: [PATCH 01/16] perl: fix syntax error in v5.14 feature /(?{})/ Slashes don't nest. --- perl.inc.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl.inc.pl b/perl.inc.pl index 1ca3b4d..e412578 100644 --- a/perl.inc.pl +++ b/perl.inc.pl @@ -84,7 +84,7 @@ use utf8; new => [ ['s///r', 'non-destructive substitution'], ['/(?^)/', 'construct to reset to default modifiers'], - ['/(?{ m// })/', 'regular expressions can be nested in /(?{})/ and /(??{})/'], + ['/(?{ m() })/', 'regular expressions can be nested in /(?{})/ and /(??{})/'], ["use re '/flags'", 'customize default modifiers'], ['each $ref e.a.', 'array and hash container functions accept references'], ['FH->method', 'filehandle method calls load IO::File on demand (eg. STDOUT->flush)'], -- 2.30.2 From ee1437d08c232641221d449e508d348db43ca837 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 25 Jan 2015 00:33:43 +0100 Subject: [PATCH 02/16] perl: intro advising common support requirements Listed platforms are: common enterprise servers (my best guess) and the top 3 linux web hosts according to W3Techs respectively. --- perl.inc.pl | 13 ++++++++----- perl.plp | 6 ++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/perl.inc.pl b/perl.inc.pl index e412578..8768465 100644 --- a/perl.inc.pl +++ b/perl.inc.pl @@ -21,8 +21,8 @@ use utf8; release => '2000-03-23', distro => { debian => 'woody', - redhat => '2.1', - solaris => '9', # 2002-05 eol 2014-10 + rhel => '2', # v5.6.0; also in red hat 7.0 + solaris => '9', # v5.6.1; 2002-05 eol 2014-10 }, unicode => '3.0.1', }, @@ -40,8 +40,9 @@ use utf8; release => '2002-07-18', distro => { debian => 'sarge', - redhat => '3.9', + rhel => '3', # v5.8.0; v5.8.8 in RHEL6 (2007-2014) solaris => '10', # v5.8.4; 2005-01 eol 2021-01 + centos => '3-5', # v5.8.0 in v3 (2004-03); v5.8.8 in v5 (eol 2017-03) }, unicode => '3.2.0', }, @@ -59,7 +60,8 @@ use utf8; release => '2007-12-18', distro => { debian => 'lenny', - redhat => '6.5', + rhel => '6', # v5.10.1 + centos => '6', # v5.10.1 (2011-07 eol 2020-11) }, unicode => '5.0.0', }, @@ -104,7 +106,8 @@ use utf8; ], release => '2012-05-20', distro => { - redhat => '7.0', + rhel => '7', # v5.16.3 + centos => '7', # v5.16.3 (2014-07 eol 2024-06) }, unicode => '6.1', }, diff --git a/perl.plp b/perl.plp index e199ddd..8ebf5e2 100644 --- a/perl.plp +++ b/perl.plp @@ -14,6 +14,12 @@ Html({ :>

Perl cheat sheets

+

The most significant features introduced for each version of the Perl scripting language. +Depending on desired compatibility you'll want to support a minimum of +v5.8 or +v5.14. +

+ <: my $info = do 'perl.inc.pl' or die $@ // $!; for my $vernum (reverse sort keys %{$info}) { -- 2.30.2 From 106a575297624a006488fe22cb785a260bee1f5c Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 25 Jan 2015 00:50:58 +0100 Subject: [PATCH 03/16] index: link perl page --- index.plp | 1 + perl.plp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index.plp b/index.plp index 250778f..8de16db 100644 --- a/index.plp +++ b/index.plp @@ -53,6 +53,7 @@ but you're free to use, print, alter, and redistribute under the AGPL license.
  • browser support
  • country codes +
  • perl versions
  • terminal colours
  • starcraft units
  • emoticons diff --git a/perl.plp b/perl.plp index 8ebf5e2..9cb8348 100644 --- a/perl.plp +++ b/perl.plp @@ -12,9 +12,9 @@ Html({ }); :> -

    Perl cheat sheets

    +

    Perl release summary

    -

    The most significant features introduced for each version of the Perl scripting language. +

    The most significant features introduced for recent versions of the Perl scripting language. Depending on desired compatibility you'll want to support a minimum of v5.8 or v5.14. -- 2.30.2 From c45cd5353d1f23fc7af98fd5eb57e2e9b72b21a5 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 25 Jan 2015 01:04:15 +0100 Subject: [PATCH 04/16] perl: common styling for release date side notes --- base.css | 5 +++++ perl.plp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/base.css b/base.css index c231fe1..185fdac 100644 --- a/base.css +++ b/base.css @@ -85,6 +85,11 @@ ul { text-align: left; } +h2 small { + position: absolute; /* side note; do not influence alignment */ + margin-left: 1em; +} + dl > dt { float: left; width: 50%; diff --git a/perl.plp b/perl.plp index 9cb8348..7b23038 100644 --- a/perl.plp +++ b/perl.plp @@ -25,7 +25,7 @@ my $info = do 'perl.inc.pl' or die $@ // $!; for my $vernum (reverse sort keys %{$info}) { my $verrow = $info->{$vernum}; print '

    '."\n"; - printf '

    %vd %s

    '."\n", $vernum, $verrow->{release}; + printf '

    %vd %s

    '."\n", $vernum, $verrow->{release}; printf '
    %s
    %s', @{$_}, '
    ' for @{ $verrow->{new} }; printf '
    Unicode
    v%s', $_ for $verrow->{unicode} || (); print "
    \n"; -- 2.30.2 From 0e7f3051f2a12fddd7071319676a9f3b79b3ff3a Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 25 Jan 2015 01:07:11 +0100 Subject: [PATCH 05/16] perl: newlines after list options HTML readability only. --- perl.plp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl.plp b/perl.plp index 7b23038..e0f6cd4 100644 --- a/perl.plp +++ b/perl.plp @@ -26,8 +26,8 @@ for my $vernum (reverse sort keys %{$info}) { my $verrow = $info->{$vernum}; print '
    '."\n"; printf '

    %vd %s

    '."\n", $vernum, $verrow->{release}; - printf '
    %s
    %s', @{$_}, '
    ' for @{ $verrow->{new} }; - printf '
    Unicode
    v%s', $_ for $verrow->{unicode} || (); + printf '
    %s
    %s'."\n", @{$_}, '
    ' for @{ $verrow->{new} }; + printf '
    Unicode
    v%s'."\n", $_ for $verrow->{unicode} || (); print "
    \n"; print "
    \n\n"; } -- 2.30.2 From e1f0b78a1c5d1234dafc366ec97bb617bbe91b6d Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 25 Jan 2015 04:17:18 +0100 Subject: [PATCH 06/16] perl: stylistic updates in feature descriptions --- perl.inc.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl.inc.pl b/perl.inc.pl index 8768465..9f20741 100644 --- a/perl.inc.pl +++ b/perl.inc.pl @@ -15,7 +15,7 @@ use utf8; [q`pack 'q'`, '64-bit integer support (also large files >2GiB)'], ['sort $coderef ()', 'comparison function can be a subroutine reference; prototype ($$) to pass elements as normal @_'], ['CHECK {}', 'special block called at end of compilation'], - ['/[[:…:]]/', 'POSIX character class syntax such as [[:alpha:]]/'], + ['/[[:…:]]/', 'POSIX character class syntax such as /[[:alpha:]]/'], # quite a lot more, but leave it at this ], release => '2000-03-23', @@ -87,7 +87,7 @@ use utf8; ['s///r', 'non-destructive substitution'], ['/(?^)/', 'construct to reset to default modifiers'], ['/(?{ m() })/', 'regular expressions can be nested in /(?{})/ and /(??{})/'], - ["use re '/flags'", 'customize default modifiers'], + ["use re '/flags'", 'customise default modifiers'], ['each $ref e.a.', 'array and hash container functions accept references'], ['FH->method', 'filehandle method calls load IO::File on demand (eg. STDOUT->flush)'], ], @@ -116,7 +116,7 @@ use utf8; new => [ ['${^LAST_FH}', 'last read filehandle (used by $.)'], ['/(?[ a + b ])/', 'regex set operations (character substraction -, unions &)'], - ['my sub foo', 'lexical subroutines (also state, our)'], + ['my sub foo', 'lexical subroutines (also state, our)'], ['next $expression', 'loop controls allow runtime expressions'], [q(no warnings 'experimental::…'), 'mechanism for experimental features, as of now required for smartmatch'], ], -- 2.30.2 From 42b4f11c5f453af00d4ab74c92640842287a62ee Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 25 Jan 2015 04:39:20 +0100 Subject: [PATCH 07/16] writing: separate V and U in latin row --- writing-phnx.inc.pl | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/writing-phnx.inc.pl b/writing-phnx.inc.pl index 3ca5677..5e0fc04 100644 --- a/writing-phnx.inc.pl +++ b/writing-phnx.inc.pl @@ -1,19 +1,19 @@ -latn => [qw{ A > B C G D > E F Y VU W Z H > - I J K L M N > X O P > - Q R > S T }], -#runr_ys => [qw{ ᚭ - ᛓ ᚴ ᛆ - > - ᚠ > > - ᛧ ᚽ ᚦ - > ᛁ - ᛚ ᛙ ᚿ > - - - > - - ᚱ > ᛌ ᛐ }], # short-twig fuþark -#runr_m => [qw{ ᚮ - ᛒ ᚲ ᛆ - > - ᚠ > > - ᛧ ᚼ ᚦ - ᛁ ᛂ - ᛚ ᛘ ᚿ > - - - > - - ᚱ > ᛋ ᛐ }], # fuþork (medieval) -runr => [qw{ ᚨ ᛈ ᛒ ᚲ ᛃ ᛞ > ᛇ ᚠ > > ᚹ ᛉ ᚺ ᚦ - > ᛁ - ᛚ ᛗ ᚾ > ᚷ ᛟ - > - ᛜ ᚱ > ᛊ ᛏ }], # elder fuþark -ital => [qw{ 𐌀 > 𐌁 > 𐌂 𐌃 > 𐌄 𐌅 > > 𐌖 𐌆 𐌇 𐌈 𐌚 𐌉 𐌝 𐌊 𐌋 𐌌 𐌍 > 𐌎 𐌏 𐌐 > 𐌑 𐌒 𐌓 > 𐌔 𐌕 }], -goth => [qw{ 𐌰 > 𐌱 𐌲 𐌾 𐌳 > 𐌴 𐍆 > > 𐍅 𐌶 𐌷 𐌸 𐍈 > 𐌹 𐌺 𐌻 𐌼 𐌽 > -𐍇 𐌿 𐍀𐌵 > - -𐍁 𐍂 > 𐍃 𐍄 }], -copt => [qw{ Ⲁ > Ⲃ > Ⲅ Ⲇ > Ⲉ > > > Ⲩ Ⲍ Ⲏ Ⲑ Ⲫ > Ⲓ Ⲕ Ⲗ Ⲙ Ⲛ Ⲭ Ⲝ Ⲟ Ⲡ > Ⲋ - Ⲣ > Ⲥ Ⲧ }], -cyrl => [qw{ А Б В > Г Д Е Э > -Ѵ > У З И -Ѳ Ф І Ј К Л М Н Х -Ѯ О П Ц Ч -Ҁ Р Ш С Т }], -lyci => [qw{ 𐊀 𐊂 𐊃 > 𐊄 𐊅 > 𐊆 > > > 𐊇 𐊈 - > 𐊉 > 𐊊 𐊋 𐊍 𐊎 𐊏 𐊐 𐊑 𐊒 𐊓 > - 𐊔 𐊕 > 𐊖 𐊗 }], -grek => [qw{ Α > Β > Γ Δ > Ε -Ϝ > > Υ Ζ Η Θ Φ Ι Ј Κ Λ Μ Ν Χ Ξ Ο Π > -Ϻ -Ϙ Ρ Σ -Ϲ Τ }], -lydi => [qw{ 𐤠 > 𐤡 𐤢 𐤹 𐤣 > 𐤤 𐤥 𐤧 > 𐤰 - - > 𐤱 > 𐤦 𐤨 𐤩 𐤪 𐤫 > - 𐤬 - > 𐤳 𐤲 𐤭 > 𐤮 𐤯 }], -phnx => [qw{ 𐤀 > 𐤁 > 𐤂 𐤃 > 𐤄 > > > 𐤅 𐤆 𐤇 > 𐤈 > 𐤉 𐤊 𐤋 𐤌 𐤍 > 𐤎 𐤏 𐤐 > 𐤑 𐤒 𐤓 > 𐤔 𐤕 }], -samr => [qw{ ࠀ > ࠁ > ࠂ ࠃ > ࠄ > > > ࠅ ࠆ ࠇ > ࠈ > ࠉ ࠊ ࠋ ࠌ ࠍ > ࠎ ࠏ ࠐ > ࠑ ࠒ ࠓ > ࠔ ࠕ }], -armi => [qw{ 𐡀 > 𐡁 > 𐡂 𐡃 > 𐡄 > > > 𐡅 𐡆 𐡇 > 𐡈 𐡉 ꜜ 𐡊 𐡋 𐡌 𐡍 > 𐡎 𐡏 𐡐 > 𐡑 𐡒 𐡓 > 𐡔 𐡕 }], -#brah => [qw{ अ > ब > ग ध > - > > > व द - थ ठ > य क ल म न > श - प > स ख र > ष त }], -hebr => [qw{ א > ב > ג ד > ה > > ו װ ז ח > ט י ײ כ ל מ נ > ס ע פ צ ץ ק ר > ש ת }], -syrc => [qw{ ܐ > ܒ > ܓ ܕ > ܗ > > > ܘ ܙ ܚ > ܛ ܝ ҩ ܟ ܠ ܡ ܢ > ܣ ܥ ܦ > ܨ ܩ ܪ > ܫ ܬ }], -arab => [qw{ ا > ب > ج د ه ـ > > > و ز ح > ط > ي ك ل م ن > س ع ف > ص ق ر > ش ت }], -#arab => [qw{ ^ ^ ^ ^ ^ ذ ^ ^ ^ ^ ^ ^ ^ خ ^ ظ ^ ^ ^ ^ ^ ^ ^ س غ ^ ^ ض ^ ﺭ ^ ^ ث }], + latn => [qw{ A > B C G D > E F Y U V W Z H > - I J K L M N > X O P > - Q R > S T }], +#runr_ys => [qw{ ᚭ - ᛓ ᚴ ᛆ - > - ᚠ > > > - ᛧ ᚽ ᚦ - > ᛁ - ᛚ ᛙ ᚿ > - - - > - - ᚱ > ᛌ ᛐ }], # short-twig fuþark +#runr_m => [qw{ ᚮ - ᛒ ᚲ ᛆ - > - ᚠ > > > - ᛧ ᚼ ᚦ - ᛁ ᛂ - ᛚ ᛘ ᚿ > - - - > - - ᚱ > ᛋ ᛐ }], # fuþork (medieval) + runr => [qw{ ᚨ ᛈ ᛒ ᚲ ᛃ ᛞ > ᛇ ᚠ > > > ᚹ ᛉ ᚺ ᚦ - > ᛁ - ᛚ ᛗ ᚾ > ᚷ ᛟ - > - ᛜ ᚱ > ᛊ ᛏ }], # elder fuþark + ital => [qw{ 𐌀 > 𐌁 > 𐌂 𐌃 > 𐌄 𐌅 > > > 𐌖 𐌆 𐌇 𐌈 𐌚 𐌉 𐌝 𐌊 𐌋 𐌌 𐌍 > 𐌎 𐌏 𐌐 > 𐌑 𐌒 𐌓 > 𐌔 𐌕 }], + goth => [qw{ 𐌰 > 𐌱 𐌲 𐌾 𐌳 > 𐌴 𐍆 > > > 𐍅 𐌶 𐌷 𐌸 𐍈 > 𐌹 𐌺 𐌻 𐌼 𐌽 > -𐍇 𐌿 𐍀𐌵 > - -𐍁 𐍂 > 𐍃 𐍄 }], + copt => [qw{ Ⲁ > Ⲃ > Ⲅ Ⲇ > Ⲉ > > > > Ⲩ Ⲍ Ⲏ Ⲑ Ⲫ > Ⲓ Ⲕ Ⲗ Ⲙ Ⲛ Ⲭ Ⲝ Ⲟ Ⲡ > Ⲋ - Ⲣ > Ⲥ Ⲧ }], + cyrl => [qw{ А Б В > Г Д Е Э > -Ѵ > > У З И -Ѳ Ф І Ј К Л М Н Х -Ѯ О П Ц Ч -Ҁ Р Ш С Т }], + lyci => [qw{ 𐊀 𐊂 𐊃 > 𐊄 𐊅 > 𐊆 > > > > 𐊇 𐊈 - > 𐊉 > 𐊊 𐊋 𐊍 𐊎 𐊏 𐊐 𐊑 𐊒 𐊓 > - 𐊔 𐊕 > 𐊖 𐊗 }], + grek => [qw{ Α > Β > Γ Δ > Ε -Ϝ > > > Υ Ζ Η Θ Φ Ι Ј Κ Λ Μ Ν Χ Ξ Ο Π > -Ϻ -Ϙ Ρ Σ -Ϲ Τ }], + lydi => [qw{ 𐤠 > 𐤡 𐤢 𐤹 𐤣 > 𐤤 𐤥 𐤧 > > 𐤰 - - > 𐤱 > 𐤦 𐤨 𐤩 𐤪 𐤫 > - 𐤬 - > 𐤳 𐤲 𐤭 > 𐤮 𐤯 }], + phnx => [qw{ 𐤀 > 𐤁 > 𐤂 𐤃 > 𐤄 > > > > 𐤅 𐤆 𐤇 > 𐤈 > 𐤉 𐤊 𐤋 𐤌 𐤍 > 𐤎 𐤏 𐤐 > 𐤑 𐤒 𐤓 > 𐤔 𐤕 }], + samr => [qw{ ࠀ > ࠁ > ࠂ ࠃ > ࠄ > > > > ࠅ ࠆ ࠇ > ࠈ > ࠉ ࠊ ࠋ ࠌ ࠍ > ࠎ ࠏ ࠐ > ࠑ ࠒ ࠓ > ࠔ ࠕ }], + armi => [qw{ 𐡀 > 𐡁 > 𐡂 𐡃 > 𐡄 > > > > 𐡅 𐡆 𐡇 > 𐡈 𐡉 ꜜ 𐡊 𐡋 𐡌 𐡍 > 𐡎 𐡏 𐡐 > 𐡑 𐡒 𐡓 > 𐡔 𐡕 }], +#brah => [qw{ अ > ब > ग ध > - > > > > व द - थ ठ > य क ल म न > श - प > स ख र > ष त }], + hebr => [qw{ א > ב > ג ד > ה > > > ו װ ז ח > ט י ײ כ ל מ נ > ס ע פ צ ץ ק ר > ש ת }], + syrc => [qw{ ܐ > ܒ > ܓ ܕ > ܗ > > > > ܘ ܙ ܚ > ܛ ܝ ҩ ܟ ܠ ܡ ܢ > ܣ ܥ ܦ > ܨ ܩ ܪ > ܫ ܬ }], + arab => [qw{ ا > ب > ج د ه ـ > > > > و ز ح > ط > ي ك ل م ن > س ع ف > ص ق ر > ش ت }], +#arab => [qw{ ^ ^ ^ ^ ^ ذ ^ ^ ^ ^ ^ > ^ ^ خ ^ ظ ^ ^ ^ ^ ^ ^ ^ س غ ^ ^ ض ^ ﺭ ^ ^ ث }], -- 2.30.2 From 61175bde8a6feb069b13efa5bffae92f5c7979ac Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 25 Jan 2015 23:53:43 +0100 Subject: [PATCH 08/16] perl: preliminary features of v5.22, hidden by default --- perl.inc.pl | 11 +++++++++++ perl.plp | 2 ++ 2 files changed, 13 insertions(+) diff --git a/perl.inc.pl b/perl.inc.pl index 9f20741..cb2b24d 100644 --- a/perl.inc.pl +++ b/perl.inc.pl @@ -137,4 +137,15 @@ use utf8; debian => 'jessie', }, }, + + v5.21.8 => { + new => [ + ['\$alias =', 'aliasing via reference'], + ['<<>>', 'safe readline ignoring open flags in arguments'], + ['/(nocapture)/n', 'flag to disable numbered capturing, turning () into (?:)'], + ], + unicode => '7.0', + release => '2015-01-20', + unstable => 1, + }, } diff --git a/perl.plp b/perl.plp index e0f6cd4..56904e1 100644 --- a/perl.plp +++ b/perl.plp @@ -24,6 +24,8 @@ Depending on desired compatibility you'll want to support a minimum of my $info = do 'perl.inc.pl' or die $@ // $!; for my $vernum (reverse sort keys %{$info}) { my $verrow = $info->{$vernum}; + $verrow->{unstable} and next unless exists $get{v}; + print '
    '."\n"; printf '

    %vd %s

    '."\n", $vernum, $verrow->{release}; printf '
    %s
    %s'."\n", @{$_}, '
    ' for @{ $verrow->{new} }; -- 2.30.2 From 26157b0b6ddd9f55d4e51d1bf95d40129596ad39 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 25 Jan 2015 23:58:47 +0100 Subject: [PATCH 09/16] perl: keep feature titles to a minimum --- perl.inc.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl.inc.pl b/perl.inc.pl index cb2b24d..67774cf 100644 --- a/perl.inc.pl +++ b/perl.inc.pl @@ -116,7 +116,7 @@ use utf8; new => [ ['${^LAST_FH}', 'last read filehandle (used by $.)'], ['/(?[ a + b ])/', 'regex set operations (character substraction -, unions &)'], - ['my sub foo', 'lexical subroutines (also state, our)'], + ['my sub', 'lexical subroutines (also state, our)'], ['next $expression', 'loop controls allow runtime expressions'], [q(no warnings 'experimental::…'), 'mechanism for experimental features, as of now required for smartmatch'], ], @@ -142,7 +142,7 @@ use utf8; new => [ ['\$alias =', 'aliasing via reference'], ['<<>>', 'safe readline ignoring open flags in arguments'], - ['/(nocapture)/n', 'flag to disable numbered capturing, turning () into (?:)'], + ['/()/n', 'flag to disable numbered capturing, turning () into (?:)'], ], unicode => '7.0', release => '2015-01-20', -- 2.30.2 From 8ee54859dde1136675f9c3cc2226984418094c0c Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 27 Jan 2015 02:10:54 +0100 Subject: [PATCH 10/16] style: less specific table cell setup to fix overrides Specifically th cells did not lose borders, broken in commit v1.5-31-gaca0a11294 (2014-02-24) [style: generic table rules like key maps]. --- base.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base.css b/base.css index 185fdac..c53f11e 100644 --- a/base.css +++ b/base.css @@ -193,7 +193,7 @@ dl.legend dt, table { border-collapse: collapse; } -table th, table td { +th, td { border-color: #778; border: 1px solid #888; background: #DDD; -- 2.30.2 From de20cc04f999154e97f8f0d041f536f048aed256 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 1 Feb 2015 08:00:32 +0100 Subject: [PATCH 11/16] countries: preliminary script to recreate include Parse Wikipedia page to compare output to current data. Lacks insular and reserved codes. --- tools/mkcountries-wikipedia | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 tools/mkcountries-wikipedia diff --git a/tools/mkcountries-wikipedia b/tools/mkcountries-wikipedia new file mode 100755 index 0000000..67916dc --- /dev/null +++ b/tools/mkcountries-wikipedia @@ -0,0 +1,32 @@ +#!/usr/bin/env perl +use 5.012; +use warnings; + +my %cc; # map of country code to info array + +while (<>) { + /
    / .. /<\/pre>/ or next;  # data is in preformatted block
    +	m{
    +		\A (? [A-Z]{2})
    +		\h (? [A-Z]{2})
    +		\h \S* \h \d*  # skip other iso codes
    +		\h (? .+)
    +	}x or next;
    +	$cc{ lc $+{codea2} } = [ $+{name}, "c-\L$+{continent}" ];
    +}
    +
    +use Data::Dump 'dd';
    +$Data::Dump::INDENT = '';
    +dd \%cc;
    +
    +__END__
    +
    +=head1 NAME
    +
    +mkcountryinfo - Create Perl include of country info from Wikipedia page
    +
    +=head1 SYNOPSIS
    +
    +	curl http://en.wikipedia.org/wiki/List_of_sovereign_states_and_dependent_territories_by_continent_%28data_file%29 |
    +	tools/mkcountryinfo > countries.inc.pl
    +
    -- 
    2.30.2
    
    
    From 49069763e748ef46dcb2587647a6f5c26bf04214 Mon Sep 17 00:00:00 2001
    From: Mischa POSLAWSKY 
    Date: Sun, 1 Feb 2015 08:06:51 +0100
    Subject: [PATCH 12/16] countries: script to create include from geonames data
    
    Great source which seems much more maintained than the outdated
    Locale::Object database used, and contains most wanted information
    (continents), except unfortunately missing reserved codes.
    ---
     tools/mkcountries-geonames | 29 +++++++++++++++++++++++++++++
     1 file changed, 29 insertions(+)
     create mode 100755 tools/mkcountries-geonames
    
    diff --git a/tools/mkcountries-geonames b/tools/mkcountries-geonames
    new file mode 100755
    index 0000000..0eaf880
    --- /dev/null
    +++ b/tools/mkcountries-geonames
    @@ -0,0 +1,29 @@
    +#!/usr/bin/env perl
    +use 5.012;
    +use warnings;
    +
    +my %cc;  # map of country code to info array
    +
    +while (<>) {
    +	/^#/ and next;  # skip comments
    +	my ($iso, $name, $cont) = (split /\t/)[0, 4, 8];
    +	my $class = "c-\L$cont";
    +	$cc{ lc $iso } = [ $name, $class ];
    +}
    +
    +say "# automatically generated by $0";
    +use Data::Dump 'dd';
    +$Data::Dump::INDENT = '';
    +dd \%cc;
    +
    +__END__
    +
    +=head1 NAME
    +
    +mkcountries-geonames - Create Perl include of country info from GeoNames data
    +
    +=head1 SYNOPSIS
    +
    +	curl http://download.geonames.org/export/dump/countryInfo.txt |
    +	tools/mkcountryinfo > countries.inc.pl
    +
    -- 
    2.30.2
    
    
    From d96b16650836046f79dc76641681445f97bd60ce Mon Sep 17 00:00:00 2001
    From: Mischa POSLAWSKY 
    Date: Sun, 1 Feb 2015 08:11:28 +0100
    Subject: [PATCH 13/16] countries: store abbreviations in include
    
    Static, so no reason to redo it every time.
    ---
     countries.plp              | 13 -------------
     tools/mkcountries-geonames | 17 +++++++++++++++++
     2 files changed, 17 insertions(+), 13 deletions(-)
    
    diff --git a/countries.plp b/countries.plp
    index 972e312..cd2040d 100644
    --- a/countries.plp
    +++ b/countries.plp
    @@ -41,19 +41,6 @@ my $cc = do 'countries.inc.pl';
     			}
     			else {
     				$_ = $short || $name;
    -				s/,.*//;
    -				s/(?<=.)\(.*\)\s*//;
    -				s/ republic\b//gi;
    -				s/ islands?\b//gi;
    -				s/\bthe //g;
    -				s/ and / & /g and s/(?<=.)[a-z ]+//g;
    -				s/\bsaint /st /gi;
    -				s/South(?:ern)? /S-/g;
    -				s/North(?:ern)? /N-/g;
    -				s/New /n./g;
    -				s/(\S)(\S+)-/$1-/g;  # strip most chars preceding dash
    -				s/(\S{4}[b-df-hj-np-tv-xz])((?%s',
    diff --git a/tools/mkcountries-geonames b/tools/mkcountries-geonames
    index 0eaf880..d9b938a 100755
    --- a/tools/mkcountries-geonames
    +++ b/tools/mkcountries-geonames
    @@ -11,6 +11,23 @@ while (<>) {
     	$cc{ lc $iso } = [ $name, $class ];
     }
     
    +for (values %cc) {
    +	for ($_->[2] //= $_->[0]) {
    +		s/,.*//;
    +		s/(?<=.)\(.*\)\s*//;
    +		s/ republic\b//gi;
    +		s/ islands?\b//gi;
    +		s/\bthe //g;
    +		s/ and / & /g and s/(?<=.)[a-z ]+//g;
    +		s/\bsaint /st /gi;
    +		s/South(?:ern)? /S-/g;
    +		s/North(?:ern)? /N-/g;
    +		s/New /n./g;
    +		s/(\S)(\S+)-/$1-/g;  # strip most chars preceding dash
    +		s/(\S{4}[b-df-hj-np-tv-xz])((?
    Date: Sun, 1 Feb 2015 08:16:28 +0100
    Subject: [PATCH 14/16] countries: hardcode reservations
    
    Missing in GeoNames import, or anywhere.  Official ISO data cannot be
    downloaded either, so manually copy it for now.
    ---
     tools/mkcountries-geonames | 37 +++++++++++++++++++++++++++++++++++++
     1 file changed, 37 insertions(+)
    
    diff --git a/tools/mkcountries-geonames b/tools/mkcountries-geonames
    index d9b938a..592ce75 100755
    --- a/tools/mkcountries-geonames
    +++ b/tools/mkcountries-geonames
    @@ -3,6 +3,40 @@ use 5.012;
     use warnings;
     
     my %cc;  # map of country code to info array
    +%cc = (
    +	# exceptional reservations
    +	ac => ["Ascension Island", "c-oc Xr", undef, 'sh'],
    +	cp => ["Clipperton Island", "c-na Xr"],
    +	dg => ["Diego Garcia", "c-as Xr", undef, 'io'],
    +	ea => ["Ceuta and Melilla", "c-af Xr"],
    +	eu => ["European Union", "c-eu Xr"],
    +	fx => ["Metropolitan France", "c-eu Xr", undef, 'fr'],
    +	ic => ["Canary Islands", "c-af Xr"],
    +	su => ["former USSR", "c-eu Xr"],
    +	ta => ["Tristan da Cunha", "c-oc Xr", undef, 'sh'],
    +	uk => ["(United Kingdom)", "c-eu Xr", undef, 'gb'],
    +
    +	# indeterminate reservations
    +	dy => ["(Benin)", "c-af Xr", undef, 'bj'],
    +	ew => ["(Estonia)", "c-eu Xr", undef, 'ee'],
    +	fl => ["(Liechtenstein)", "c-eu Xr", undef, 'li'],
    +	ja => ["(Jamaica)", "c-na Xr", undef, 'jm'],
    +	lf => ["Libya Fezzan", "c-af Xr", "Fezzan", 'ly'],
    +	pi => ["(Philippines)", "c-as Xr", undef, 'ph'],
    +	ra => ["(Argentina)", "c-sa Xr", undef, 'ar'],
    +	rb => ["Bolivia/Botswana", "c-xx Xr"],
    +	rc => ["(RoC)", "c-as Xr", undef, 'tw'],
    +	rh => ["(Haiti)", "c-na Xr",undef, 'ht'],
    +	ri => ["(Indonesia)", "c-as Xr", undef, 'id'],
    +	rl => ["(Lebanon)", "c-as Xr", undef, 'lb'],
    +	rm => ["(Madagascar)", "c-af Xr", undef, 'mg'],
    +	rn => ["(Niger)", "c-af Xr",undef, 'ne'],
    +	rp => ["(Philippines)", "c-as Xr", undef, 'ph'],
    +	wg => ["(Grenada)", "c-na Xr", undef, 'gd'],
    +	wl => ["(Saint Lucia)", "c-na Xr", "(Saint Luc.)", 'lc'],
    +	wv => ["(Saint Vincent)", "c-na Xr", "(Saint Vin.)", 'vc'],
    +	yv => ["(Venezuela)", "c-sa Xr", undef, 've'],
    +);
     
     while (<>) {
     	/^#/ and next;  # skip comments
    @@ -11,6 +45,9 @@ while (<>) {
     	$cc{ lc $iso } = [ $name, $class ];
     }
     
    +$cc{io}->[2] = "Chagos Islands";
    +$cc{um}->[2] = "U.S. isl.";
    +
     for (values %cc) {
     	for ($_->[2] //= $_->[0]) {
     		s/,.*//;
    -- 
    2.30.2
    
    
    From dcefcbbaea0166c5eedf208ada319e451ddff160 Mon Sep 17 00:00:00 2001
    From: Mischa POSLAWSKY 
    Date: Sun, 1 Feb 2015 08:17:27 +0100
    Subject: [PATCH 15/16] countries: fix antarctica continent class
    
    Convert GeoNames' AN to our AA to fix styling.
    ---
     tools/mkcountries-geonames | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/tools/mkcountries-geonames b/tools/mkcountries-geonames
    index 592ce75..99201b8 100755
    --- a/tools/mkcountries-geonames
    +++ b/tools/mkcountries-geonames
    @@ -41,6 +41,7 @@ my %cc;  # map of country code to info array
     while (<>) {
     	/^#/ and next;  # skip comments
     	my ($iso, $name, $cont) = (split /\t/)[0, 4, 8];
    +	$cont =~ s/\AAN\z/aa/;  # different antarctica abbreviation
     	my $class = "c-\L$cont";
     	$cc{ lc $iso } = [ $name, $class ];
     }
    -- 
    2.30.2
    
    
    From 1c9e4de248f4c75b4ee27c851844807bece9b33e Mon Sep 17 00:00:00 2001
    From: Mischa POSLAWSKY 
    Date: Sun, 1 Feb 2015 08:19:18 +0100
    Subject: [PATCH 16/16] countries: stop tracking data include
    
    Generated by tools/mkcountries-geonames instead.
    ---
     .gitignore       |   1 +
     countries.inc.pl | 255 -----------------------------------------------
     2 files changed, 1 insertion(+), 255 deletions(-)
     delete mode 100644 countries.inc.pl
    
    diff --git a/.gitignore b/.gitignore
    index b09855f..4a150cc 100644
    --- a/.gitignore
    +++ b/.gitignore
    @@ -1,3 +1,4 @@
     /rfc1345.txt
    +/countries.inc.pl
     /digraphs.inc.pl
     /ttfsupport/
    diff --git a/countries.inc.pl b/countries.inc.pl
    deleted file mode 100644
    index 8be81c9..0000000
    --- a/countries.inc.pl
    +++ /dev/null
    @@ -1,255 +0,0 @@
    -# perl -MDBIx::Simple -MData::Dump=pp -e 'pp({DBIx::Simple->new("dbi:SQLite:dbname=locale.db")->query("SELECT country.code_alpha2, country.name, continent.name FROM country LEFT JOIN continent ON country.code_alpha2 = continent.country_code ORDER BY country.code_alpha2")->map_arrays(0)})'
    -{
    -ac => ["Ascension (dependency of Saint Helena)", 'c-oc Xr', undef, 'sh'],
    -ad => ["Andorra", 'c-eu'],
    -ae => ["United Arab Emirates", 'c-as'],
    -af => ["Afghanistan", 'c-as'],
    -ag => ["Antigua and Barbuda", 'c-na'],
    -ai => ["Anguilla", 'c-na'],
    -al => ["Albania", 'c-eu'],
    -am => ["Armenia", 'c-eu'],
    -an => ["Netherlands Antilles", 'c-oc'],
    -ao => ["Angola", 'c-af'],
    -aq => ["Antarctica", "c-aa"],
    -ar => ["Argentina", 'c-sa'],
    -as => ["American Samoa", 'c-na'],
    -at => ["Austria", 'c-eu'],
    -au => ["Australia", 'c-oc'],
    -aw => ["Aruba", 'c-na'],
    -az => ["Azerbaijan", 'c-eu'],
    -ba => ["Bosnia and Herzegovina", 'c-eu'],
    -bb => ["Barbados", 'c-na'],
    -bd => ["Bangladesh", 'c-as'],
    -be => ["Belgium", 'c-eu'],
    -bf => ["Burkina Faso", 'c-oc'],
    -bg => ["Bulgaria", 'c-eu'],
    -bh => ["Bahrain", 'c-as'],
    -bi => ["Burundi", 'c-af'],
    -bj => ["Benin", 'c-af'],
    -bm => ["Bermuda", 'c-na'],
    -bn => ["Brunei Darussalam", 'c-as'],
    -bo => ["Bolivia", 'c-sa'],
    -br => ["Brazil", 'c-sa'],
    -bs => ["Bahamas", 'c-na'],
    -bt => ["Bhutan", 'c-as'],
    -bv => ["Bouvet Island", 'c-oc'],
    -bw => ["Botswana", 'c-af'],
    -by => ["Belarus", 'c-eu'],
    -bz => ["Belize", 'c-na'],
    -ca => ["Canada", 'c-na'],
    -cc => ["Cocos (Keeling) Islands", 'c-oc'],
    -cd => ["Congo, the Democratic Republic of the", 'c-af'],
    -cf => ["Central African Republic", 'c-af'],
    -cg => ["Congo", 'c-af'],
    -ch => ["Switzerland", 'c-eu'],
    -ci => ["Cote D'Ivoire", 'c-af'],
    -ck => ["Cook Islands", 'c-oc'],
    -cl => ["Chile", 'c-sa'],
    -cm => ["Cameroon", 'c-af'],
    -cn => ["China", 'c-as'],
    -co => ["Colombia", 'c-sa'],
    -cp => ["Clipperton (French possession)", 'c-na Xr', undef, 'fr'],
    -cr => ["Costa Rica", 'c-na'],
    -cu => ["Cuba", 'c-na'],
    -cv => ["Cape Verde", 'c-af'],
    -cx => ["Christmas Island", 'c-oc'],
    -cy => ["Cyprus", 'c-eu'],
    -cz => ["Czech Republic", 'c-eu'],
    -de => ["Germany", 'c-eu'],
    -dj => ["Djibouti", 'c-af'],
    -dk => ["Denmark", 'c-eu'],
    -dg => ["Diego Garcia (British Territory)", 'c-as Xr', undef, 'io'],
    -dm => ["Dominica", 'c-na'],
    -do => ["Dominican Republic", 'c-na'],
    -dz => ["Algeria", 'c-af'],
    -ea => ["Ceuta and Melilla (Spanish cities outside EU territory)", 'c-af Xr', undef, 'es'],
    -ec => ["Ecuador", 'c-sa'],
    -ee => ["Estonia", 'c-eu'],
    -eg => ["Egypt", 'c-af'],
    -eh => ["Western Sahara", 'c-af'],
    -er => ["Eritrea", 'c-af'],
    -es => ["Spain", 'c-eu'],
    -et => ["Ethiopia", 'c-af'],
    -eu => ["European Union", 'c-eu Xr'],
    -fi => ["Finland", 'c-eu'],
    -fj => ["Fiji", 'c-oc'],
    -fk => ["Falkland Islands (Malvinas)", 'c-sa'],
    -fm => ["Micronesia, Federated States of", 'c-oc'],
    -fo => ["Faroe Islands", 'c-oc'],
    -fr => ["France", 'c-eu'],
    -fx => ["Metropolitan France", 'c-eu Xr', undef, 'fr'],
    -ga => ["Gabon", 'c-af'],
    -gb => ["United Kingdom", 'c-eu'],
    -gd => ["Grenada", 'c-na'],
    -ge => ["Georgia", 'c-eu'],
    -gf => ["French Guiana", 'c-sa'],
    -gh => ["Ghana", 'c-af'],
    -gi => ["Gibraltar", 'c-eu'],
    -gl => ["Greenland", 'c-eu'],
    -gm => ["Gambia", 'c-af'],
    -gn => ["Guinea", 'c-af'],
    -gp => ["Guadeloupe", 'c-sa'],
    -gq => ["Equatorial Guinea", 'c-af'],
    -gr => ["Greece", 'c-eu'],
    -gs => ["South Georgia and the South Sandwich Islands", 'c-oc'],
    -gt => ["Guatemala", 'c-na'],
    -gu => ["Guam", 'c-na'],
    -gw => ["Guinea-Bissau", 'c-af'],
    -gy => ["Guyana", 'c-sa'],
    -hk => ["Hong Kong", 'c-as'],
    -hm => ["Heard Island and McDonald Islands", 'c-oc'],
    -hn => ["Honduras", 'c-na'],
    -hr => ["Croatia", 'c-eu'],
    -ht => ["Haiti", 'c-na'],
    -hu => ["Hungary", 'c-eu'],
    -ic => ["Canary Islands (Spanish archipelago)", 'c-af Xr'],
    -id => ["Indonesia", 'c-as'],
    -ie => ["Ireland", 'c-eu'],
    -il => ["Israel", 'c-as'],
    -in => ["India", 'c-as'],
    -io => ["British Indian Ocean Territory", 'c-oc', 'Chagos'],
    -iq => ["Iraq", 'c-as'],
    -ir => ["Iran, Islamic Republic of", 'c-as'],
    -is => ["Iceland", 'c-eu'],
    -it => ["Italy", 'c-eu'],
    -jm => ["Jamaica", 'c-na'],
    -jo => ["Jordan", 'c-as'],
    -jp => ["Japan", 'c-as'],
    -ke => ["Kenya", 'c-af'],
    -kg => ["Kyrgyzstan", 'c-as'],
    -kh => ["Cambodia", 'c-as'],
    -ki => ["Kiribati", 'c-oc'],
    -km => ["Comoros", 'c-af'],
    -kn => ["Saint Kitts and Nevis", 'c-na'],
    -kp => ["Korea, Democratic People's Republic of", 'c-as', "North Korea"],
    -kr => ["Korea, Republic of", 'c-as', "South Korea"],
    -kw => ["Kuwait", 'c-as'],
    -ky => ["Cayman Islands", 'c-oc'],
    -kz => ["Kazakhstan", 'c-as'],
    -la => ["Lao People's Democratic Republic", 'c-as', "Lao"],
    -lb => ["Lebanon", 'c-as'],
    -lc => ["Saint Lucia", 'c-na'],
    -li => ["Liechtenstein", 'c-eu'],
    -lk => ["Sri Lanka", 'c-as'],
    -lr => ["Liberia", 'c-af'],
    -ls => ["Lesotho", 'c-af'],
    -lt => ["Lithuania", 'c-eu'],
    -lu => ["Luxembourg", 'c-eu'],
    -lv => ["Latvia", 'c-eu'],
    -ly => ["Libyan Arab Jamahiriya", 'c-af', "Libya"],
    -ma => ["Morocco", 'c-af'],
    -mc => ["Monaco", 'c-eu'],
    -md => ["Moldova, Republic of", 'c-eu'],
    -me => ["Montenegro, Republic of", 'c-eu'],
    -mg => ["Madagascar", 'c-af'],
    -mh => ["Marshall Islands", 'c-oc'],
    -mk => ["Macedonia, the Former Yugoslav Republic of", 'c-eu'],
    -ml => ["Mali", 'c-af'],
    -mm => ["Myanmar", 'c-as'],
    -mn => ["Mongolia", 'c-as'],
    -mo => ["Macao", 'c-as'],
    -mp => ["Northern Mariana Islands", 'c-oc'],
    -mq => ["Martinique", 'c-na'],
    -mr => ["Mauritania", 'c-af'],
    -ms => ["Montserrat", 'c-na'],
    -mt => ["Malta", 'c-eu'],
    -mu => ["Mauritius", 'c-af'],
    -mv => ["Maldives", 'c-as'],
    -mw => ["Malawi", 'c-af'],
    -mx => ["Mexico", 'c-na'],
    -my => ["Malaysia", 'c-as'],
    -mz => ["Mozambique", 'c-af'],
    -na => ["Namibia", 'c-af'],
    -nc => ["New Caledonia", 'c-oc'],
    -ne => ["Niger", 'c-af'],
    -nf => ["Norfolk Island", 'c-oc'],
    -ng => ["Nigeria", 'c-af'],
    -ni => ["Nicaragua", 'c-na'],
    -nl => ["Netherlands", 'c-eu'],
    -no => ["Norway", 'c-eu'],
    -np => ["Nepal", 'c-as'],
    -nr => ["Nauru", 'c-oc'],
    -nu => ["Niue", 'c-oc'],
    -nz => ["New Zealand", 'c-oc'],
    -om => ["Oman", 'c-as'],
    -pa => ["Panama", 'c-na'],
    -pe => ["Peru", 'c-sa'],
    -pf => ["French Polynesia", 'c-oc'],
    -pg => ["Papua New Guinea", 'c-oc'],
    -ph => ["Philippines", 'c-as'],
    -pk => ["Pakistan", 'c-as'],
    -pl => ["Poland", 'c-eu'],
    -pm => ["Saint Pierre and Miquelon", 'c-oc'],
    -pn => ["Pitcairn", 'c-oc'],
    -pr => ["Puerto Rico", 'c-na'],
    -ps => ["Palestinian Territory, Occupied", 'c-as'],
    -pt => ["Portugal", 'c-eu'],
    -pw => ["Palau", 'c-oc'],
    -py => ["Paraguay", 'c-sa'],
    -qa => ["Qatar", 'c-as'],
    -re => ["Reunion", 'c-oc'],
    -ro => ["Romania", 'c-eu'],
    -rs => ["Serbia, Republic of", 'c-eu'],
    -ru => ["Russian Federation", 'c-eu', "Russia"],
    -rw => ["Rwanda", 'c-af'],
    -sa => ["Saudi Arabia", 'c-as'],
    -sb => ["Solomon Islands", 'c-oc'],
    -sc => ["Seychelles", 'c-af'],
    -sd => ["Sudan", 'c-af'],
    -se => ["Sweden", 'c-eu'],
    -sg => ["Singapore", 'c-as'],
    -sh => ["Saint Helena", 'c-oc'],
    -si => ["Slovenia", 'c-eu'],
    -sj => ["Svalbard and Jan Mayen", 'c-oc'],
    -sk => ["Slovakia", 'c-eu'],
    -sl => ["Sierra Leone", 'c-af'],
    -sm => ["San Marino", 'c-eu'],
    -sn => ["Senegal", 'c-af'],
    -so => ["Somalia", 'c-af'],
    -sr => ["Suriname", 'c-sa'],
    -st => ["Sao Tome and Principe", 'c-af'],
    -su => ["former USSR", 'c-eu Xr'],
    -sv => ["El Salvador", 'c-na'],
    -sy => ["Syrian Arab Republic", 'c-as'],
    -sz => ["Swaziland", 'c-af'],
    -ta => ["Tristan da Cunha (dependency of Saint Helena)", 'c-oc Xr'],
    -tc => ["Turks and Caicos Islands", 'c-na'],
    -td => ["Chad", 'c-af'],
    -tf => ["French Southern Territories", 'c-oc'],
    -tg => ["Togo", 'c-af'],
    -th => ["Thailand", 'c-as'],
    -tj => ["Tajikistan", 'c-as'],
    -tk => ["Tokelau", 'c-oc'],
    -tl => ["East Timor", 'c-as'],
    -tm => ["Turkmenistan", 'c-as'],
    -tn => ["Tunisia", 'c-af'],
    -to => ["Tonga", 'c-oc'],
    -tr => ["Turkey", 'c-as'],
    -tt => ["Trinidad and Tobago", 'c-na'],
    -tv => ["Tuvalu", 'c-oc'],
    -tw => ["Taiwan, Province of China", 'c-as'],
    -tz => ["Tanzania, United Republic of", 'c-af'],
    -ua => ["Ukraine", 'c-eu'],
    -ug => ["Uganda", 'c-af'],
    -uk => ["(United Kingdom)", 'c-eu Xr', undef, 'gb'],
    -um => ["United States Minor Outlying Islands", 'c-na', 'U.S. isl.'],
    -us => ["United States", 'c-na'],
    -uy => ["Uruguay", 'c-sa'],
    -uz => ["Uzbekistan", 'c-as'],
    -va => ["Holy See (Vatican City State)", 'c-eu'],
    -vc => ["Saint Vincent and the Grenadines", 'c-na'],
    -ve => ["Venezuela", 'c-sa'],
    -vg => ["Virgin Islands, British", 'c-na', "British Virgin"],
    -vi => ["Virgin Islands, U.S.", 'c-na', "U.S. Virgin"],
    -vn => ["Vietnam", 'c-as'],
    -vu => ["Vanuatu", 'c-oc'],
    -wf => ["Wallis and Futuna", 'c-oc'],
    -ws => ["Samoa", 'c-oc'],
    -ye => ["Yemen", 'c-as'],
    -yt => ["Mayotte", 'c-oc'],
    -yu => ["Yugoslavia", 'c-eu'],
    -za => ["South Africa", 'c-af'],
    -zm => ["Zambia", 'c-af'],
    -zr => ["Zaire", 'c-af'],
    -zw => ["Zimbabwe", 'c-af'],
    -}
    -- 
    2.30.2