Closed 39832 closed 7 years ago
Do you have a snippet of code I can use as a test case?
new Number::Phone::Lib("+358 18 3456789");
What version of Number::Phone are you using? It works with the most recent stable release:
$ perl -MNumber::Phone -E 'say $Number::Phone::VERSION'
3.4001
$ perl -MNumber::Phone::Lib -E 'say Number::Phone::Lib->new("+358 18 3456789")->country()'
AX
$ perl -MData::Dumper -MNumber::Phone::Lib -E 'say Dumper(Number::Phone::Lib->new("+358 18 3456789")->type())'
$VAR1 = 'is_valid';
$VAR2 = 'is_geographic';
$VAR3 = 'is_fixed_line';
Yes, I must have been checking against an old version by accident.
Number::Phone::Lib maps a number to a country before validating it by libphonenumber. The initial mapping leads to the list (Finland, Åland), and then it ignores Åland and chooses Finland, and then libphonenumber says that Åland numbers aren't in Finland. Number::Phone has other instances of lists, such as Vatican, Mayotte and Christmas Island, but I haven't checked what libphonenumber does with them.