diff --git a/MANIFEST b/MANIFEST index f94df91..0705e19 100644 --- a/MANIFEST +++ b/MANIFEST @@ -358,3 +358,4 @@ lib/Number/Phone/StubCountry/InternationalNetworks882.pm lib/Number/Phone/StubCountry/InternationalNetworks883.pm lib/Number/Phone/StubCountry/TelecomsForDisasterRelief.pm lib/Number/Phone/StubCountry/InternationalPremiumRate.pm +t/country-test-bq.t diff --git a/lib/Number/Phone/StubCountry.pm b/lib/Number/Phone/StubCountry.pm index d3b8fc5..31793e8 100644 --- a/lib/Number/Phone/StubCountry.pm +++ b/lib/Number/Phone/StubCountry.pm @@ -92,7 +92,8 @@ sub format { return join(' ', '+'.$self->country_code(), @bits); } } - # return '+'.$self->country_code().' '.$number; + # if there's no formatters defined ... + return '+'.$self->country_code().' '.$number; } 1; diff --git a/t/country-test-bq.t b/t/country-test-bq.t new file mode 100644 index 0000000..2422f2a --- /dev/null +++ b/t/country-test-bq.t @@ -0,0 +1,12 @@ +use strict; +use warnings; + +use Number::Phone; + +use Test::More; + +my $p = Number::Phone->new("+5997900000"); + +is($p->format(), "+599 7900000", "Bonaire (BQ) number correctly formatted"); + +done_testing();