Branch Coverage

blib/lib/Number/Phone/UK.pm
Criterion Covered Total %
branch 53 58 93.1


line true false branch
31 300 37 if (is_valid($number)) { }
34 6 294 if $class ne $target_class
90 43 2792 if (exists Number::Phone::UK::Data::db()->{'subclass'}{$prefix})
91 0 43 if Number::Phone::UK::Data::db()->{'subclass'}{$prefix} eq ""
121 28 337 if &blessed($number)
126 135 202 if $cache->{$number}{'is_valid'}
136 17 185 if length $cleaned_number < 7 or length $cleaned_number > 10
139 6 179 if $cleaned_number =~ /^(4|5[01234789]|6)/
143 8 171 if $cleaned_number =~ /^([27]|11)/ and length $cleaned_number != 10
153 110 61 if ($telco_and_length_code and Number::Phone::UK::Data::db()->{'telco_format'}{$telco_and_length_code}{'telco'}) { }
55 6 elsif ($telco_and_length_code) { }
166 165 6 if ($cache->{$number}{'format'} and $cache->{$number}{'format'} =~ /\+/)
169 18 147 $subscriberlength =~ m[/] ? :
178 6 159 unless (grep {length $cache->{$number}{'subscriber'} == $_;} @subscriberlengths)
190 14 16 if is_mobile(@_)
225 48 504 if $num =~ /$d/
238 288 252 unless (exists $$cache{${$self;}}{"is_$is"})
366 2 4 unless $self->is_geographic
373 0 4 unless ($ENV{'TESTINGKILLTHEWABBIT'})
376 2 2 unless $Number::Phone::UK::Exchanges::db
379 4 24 if (exists $Number::Phone::UK::Exchanges::db->{'exchg_prefices'}{$_})
412 38 25 if ($self->areacode) { }
9 16 elsif ($self->subscriber and $self->subscriber =~ /^7/) { }
16 0 elsif (not $self->is_allocated && $cache->{$self}{'format'}) { }
0 0 elsif ($self->subscriber) { }
414 2 36 if (length $self->subscriber == 7) { }
11 25 elsif (length $self->subscriber == 8) { }
443 1 9 unless $to->is_allocated
444 4 5 $to->areacode ? :