Skip to content

Commit

Permalink
Book-keeping for release
Browse files Browse the repository at this point in the history
  • Loading branch information
DrHyde committed Dec 10, 2023
1 parent ade7686 commit 46f3b3e
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 32 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG
@@ -1,7 +1,9 @@
4.xxxx xxxx-xx-xx
4.0001 2023-12-10

- Clarification in doco re supported perl versions

- Data updates

4.0000 2023-09-03

- Switch to Data::CompactReadonly for UK database. The UK database is now
Expand Down
23 changes: 9 additions & 14 deletions build-data.country-mapping
Expand Up @@ -150,12 +150,12 @@ foreach my $tuple (
[ 672 => ['AQ', 'NF' ]], # no AQ in libphonenumber
[ 7 => ['RU', 'KZ' ]],

# checked on 2022-12-03
# next check due 2023-12-01 (annually)
# checked on 2023-12-10
# next check due 2024-12-01 (annually)
[ 2125288 => 'EH' ], # see https://en.wikipedia.org/wiki/Telephone_numbers_in_Western_Sahara
[ 2125289 => 'EH' ], # see https://en.wikipedia.org/wiki/Telephone_numbers_in_Western_Sahara
[ 262269 => 'YT' ], # Mayotte fixed lines, see http://www.wtng.info/wtng-262-fr.html
[ 262639 => 'YT' ], # Mayotte GSM, see http://www.wtng.info/wtng-262-fr.html
[ 262269 => 'YT' ], # Mayotte fixed lines, see https://en.wikipedia.org/wiki/Telephone_numbers_in_France
[ 262639 => 'YT' ], # Mayotte GSM, see https://en.wikipedia.org/wiki/Telephone_numbers_in_France
[ 35348 => 'GB' ], # https://en.wikipedia.org/wiki/Telephone_numbers_in_the_Republic_of_Ireland#Calls_to_Northern_Ireland
[ 379 => 'VA' ], # Vatican (not in use, missing from libphonenumber), see https://en.wikipedia.org/wiki/Telephone_numbers_in_Vatican_City
[ 3906698 => 'VA' ], # Vatican in Italian dialling plan, see https://en.wikipedia.org/wiki/Telephone_numbers_in_Vatican_City
Expand Down Expand Up @@ -210,8 +210,8 @@ foreach my $tuple (
# see http://wtng.info/ccod-6.html#CC61 (Christmas Island)
# see https://en.wikipedia.org/wiki/Telephone_numbers_in_the_Australian_Antarctic_Territory
# see https://en.wikipedia.org/wiki/Telephone_numbers_in_Norfolk_Island
# checked on 2022-12-03
# next check due 2023-12-01 (annually)
# checked on 2023-12-10
# next check due 2024-12-01 (annually)
[ 5999 => 'CW' ], # Curacao
[ 6189162 => 'CC' ], # Cocos (Keeling) Islands
[ 6189164 => 'CX' ], # Christmas Island
Expand All @@ -223,9 +223,9 @@ foreach my $tuple (
[ 6723 => 'NF' ], # Norfolk Island

# see http://en.wikipedia.org/wiki/Telephone_numbers_in_Kazakhstan
# NB planned change to +997
# checked on 2022-12-03
# next check due 2023-12-01 (annually)
# NB planned change to +997 or +77
# checked on 2023-12-10
# next check due 2024-12-01 (annually)
[ 76 => 'KZ' ],
[ 77 => 'KZ' ],

Expand All @@ -238,11 +238,6 @@ foreach my $tuple (
[ 38129 => 'XK' ],
[ 38138 => 'XK' ],
[ 38139 => 'XK' ],
# I *think* +377 and +386 are no longer used
# [ 37744 => 'XK' ],
# [ 37745 => 'XK' ],
# [ 38643 => 'XK' ],
# [ 38649 => 'XK' ],

do {
map {
Expand Down
8 changes: 4 additions & 4 deletions build-data.uk
Expand Up @@ -114,8 +114,8 @@ foreach my $datum (@telco_length_data) {
# see https://github.com/DrHyde/perl-modules-Number-Phone/issues/112
# at least some 9 digit numbers exist in this range but OFCOM claim
# it's 10 digit
# checked on 2023-06-01
# next check due 2023-12-01 (semi-annually)
# checked on 2023-12-10
# next check due 2024-06-01 (semi-annually)
if($prefix eq '800716') {
warn "Correcting OFCOM's broken data for 8007 16\n";
$format = '0+9/10';
Expand Down Expand Up @@ -173,8 +173,8 @@ Data::CompactReadonly->create(
format => \%format_by_prefix,
subclass => {
# taken from libphonenumber
# checked on 2022-12-02
# next check due 2023-12-01 (annually)
# checked on 2023-12-10
# next check due 2024-12-01 (annually)
# NB for all of these also check build-data.country-mapping
(map { $_ => 'GG' } (
1481, 7781, 7839, 79111, 79117
Expand Down
2 changes: 1 addition & 1 deletion lib/Number/Phone.pm
Expand Up @@ -18,7 +18,7 @@ use Devel::Deprecations::Environmental
OldPerl => { unsupported_from => '2023-01-08', older_than => '5.12.0' };

# MUST be in format N.NNNN, see https://github.com/DrHyde/perl-modules-Number-Phone/issues/58
our $VERSION = '4.0000';
our $VERSION = '4.0001';

my $NOSTUBS = 0;
sub import {
Expand Down
4 changes: 2 additions & 2 deletions lib/Number/Phone/Country.pm
Expand Up @@ -118,8 +118,8 @@ our %NANP_areas = (
$usa = join('|', $usa, 710);
},
# see https://en.wikipedia.org/wiki/North_American_Numbering_Plan#Countries_and_territories
# checked on 2022-12-03
# next check due 2023-12-01 (annually)
# checked on 2023-12-10
# next check due 2024-12-01 (annually)
AS => '684', # American Samoa
AI => '264', # Anguilla
AG => '268', # Antigua and Barbude
Expand Down
4 changes: 2 additions & 2 deletions lib/Number/Phone/NANP.pm
Expand Up @@ -324,8 +324,8 @@ sub is_tollfree {
# FIXME this really should be data-driven, based on US data in libphonenumber
# https://en.wikipedia.org/wiki/Toll-free_telephone_numbers_in_the_North_American_Numbering_Plan
# see also tests in t/nanp.t if anything changes
# checked on 2022-12-08
# next check due 2023-12-01 (annually)
# checked on 2023-12-10
# next check due 2024-12-01 (annually)
if(${$self} =~ /^(\+1)?8(00|33|44|55|66|77|88)/) { return 1; }
else { return 0; }
}
Expand Down
12 changes: 6 additions & 6 deletions t/inc/common-nanp_and_libphonenumber_tests.pl
Expand Up @@ -163,8 +163,8 @@
['+1 473 230 0000' => 'COLUMBUS COMMUNICATIONS (GRENADA) LIMITED'],
['+1 649 231 0000' => 'CABLE & WIRELESS (TC)'],
# No data yet.
# checked on 2022-12-03
# next check due 2023-12-01 (annually) until there's data
# checked on 2023-12-10
# next check due 2024-12-01 (annually) until there's data
# at https://localcallingguide.com/xmlprefix.php?npa=658&blocks=1
# ['+1 658 ??? 0000' => '???'],
['+1 664 349 0000' => 'CABLE & WIRELESS (RT)'],
Expand Down Expand Up @@ -194,12 +194,12 @@
"Oh good, the database contains data for all the non-US/CA area codes (except 658, for which no data are yet available)"
);

# checked on 2022-12-03 that these are consolidated ten-thousand blocks
# next check due 2023-12-01 (annually)
# checked on 2023-12-10 that these are consolidated ten-thousand blocks
# next check due 2024-12-01 (annually)
# https://localcallingguide.com/xmlprefix.php?npa=630&blocks=1
is($CLASS->new('+1 630 847 0000')->operator(), 'YMAX COMMUNICATIONS CORP. - IL', 'USA, thousands blocks all for same operator, so consolidated into one to save space in database');
# checked on 2022-12-03
# next check due 2023-12-01 (annually)
# checked on 2022-12-10
# next check due 2024-12-01 (annually)
# https://localcallingguide.com/xmlprefix.php?npa=242&blocks=1
is($CLASS->new('+1 242 367 0000')->operator(), 'BARTELCO (BA)', 'Bahamas, thousands blocks all for same operator, so consolidated into one to save space in database');

Expand Down
4 changes: 2 additions & 2 deletions t/inc/uk_tests.pl
Expand Up @@ -93,8 +93,8 @@
ok($number->is_pager(), "pagers correctly identified");

# see https://github.com/DrHyde/perl-modules-Number-Phone/issues/112
# checked on 2023-06-13
# next check due 2023-12-01 (semi-annually)
# checked on 2023-12-10
# next check due 2024-06-01 (semi-annually)
subtest "0800 716 range has the wrong length, OFCOM says 10 digits but 0800 716 598 is diallable" => sub {
$number = Number::Phone->new('+44800716598'); # used by Barclays
isa_ok(
Expand Down

0 comments on commit 46f3b3e

Please sign in to comment.