Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add more incompatibility warnings in doco

  • Loading branch information...
commit 38ab50cc28d9637bdb844c565037bf756b570edb 1 parent 0e3977e
@DrHyde DrHyde authored
View
1  CHANGELOG
@@ -1,6 +1,7 @@
2010-09-12 1.8 INCOMPATIBLE CHANGE: constructor will now return
a minimal object instead of undef if there's no
country-specific module available
+ New UK allocations
2010-07-05 1.7101 Bugfix for N::P->new('CC', '+NN12345');
View
2  MANIFEST
@@ -51,3 +51,5 @@ t/30_find-right-subclass.t
t/54_number-phone-country-prefix.t
t/900_bugfix-rt48581.t
t/901_bugfix_N-P-New-CC-number.t
+lib/Number/Phone/StubCountry.pm
+t/902_bugfix-rt61177.t
View
14 lib/Number/Phone.pm
@@ -7,7 +7,7 @@ use Scalar::Util 'blessed';
use Number::Phone::Country qw(noexport uk);
use Number::Phone::StubCountry;
-our $VERSION = 1.7101;
+our $VERSION = 1.8;
my @is_methods = qw(
is_valid is_allocated is_in_use
@@ -366,8 +366,11 @@ there isn't one, and looking the country up using
Number::Phone::Country. That gives us a two letter country code that
is used to try to load the right module.
-The constructor returns undef if it can not figure out which subclass to
-use.
+The constructor returns undef if it can not figure out what country
+you're talking about, or a minimal object if there's no country-specific
+module available. Note that in the case of there being no country-specific
+module available this is an incompatible change: previously it would
+return undef.
=back
@@ -395,6 +398,11 @@ Note that subclasses no longer need to register themselves with
Number::Phone. In fact, registration is now *ignored* as the magic
country detector now works properly.
+=head1 WARNING
+
+There is an incompatible change in version 1.8. See the SYNOPSIS and
+the documentation for the C<new> method above.
+
=head1 BUGS/FEEDBACK
Please report bugs by email or using http://rt.cpan.org, including,
View
BIN  lib/Number/Phone/UK/Data.pm
Binary file not shown
View
2  t/902_bugfix-rt61177.t
@@ -10,7 +10,7 @@ use Number::Phone::Country;
ok(Number::Phone->new("442087712924")->country_code() == 44, "known countries return objects");
ok(Number::Phone->new("+442087712924")->country_code() == 44, "known countries with a + return objects");
-ok(Number::Phone->new("+442087712924")->format() eq '+44 20 87712924' , "known countries with a + return objects");
+ok(Number::Phone->new("+442087712924")->format() eq '+44 20 87712924' , "format() works (sanity check cos it changes later)");
# let's break the UK
$Number::Phone::Country::idd_codes{'44'} = 'MOCK';
Please sign in to comment.
Something went wrong with that request. Please try again.