Subject: | is_valid:geo prefices should be tested before others |
geo prefices should be tested before others as numbers can match both.
for example the following phone number are mishandled -
01-8011080
01-8011090
01-8903502
01-8904142
01-9680445
###########################################################
--- lib/Number/Phone/IE.pm Mon Jan 23 12:21:13 2012
+++ lib/Number/Phone/IE.pm.new Tue Jan 24 11:03:52 2012
@@ -89,9 +89,20 @@
adult => 'adult_prefices',
ipphone => 'ip_prefices'
);
+
+ my @numberTypesSequence = qw(
+ geographic
+ network_service
+ tollfree
+ pager
+ mobile
+ specialrate
+ adult
+ ipphone
+ );
my $prefix;
- foreach my $type (keys %numberTypes)
+ foreach my $type (@numberTypesSequence)
{
my $dataSource = $numberTypes{$type};