Branch Coverage

blib/lib/Number/Phone.pm
Criterion Covered Total %
branch 74 84 88.1


line true false branch
28 1 5105 if (grep {/^nostubs$/;} @params)
50 0 23 unless ($file)
81 36 3 wantarray ? :
94 5 12 if ($from->country_code != $to->country_code)
95 2 1 $to->areacode ? :
2 3 $to->isa('Number::Phone::StubCountry') ? :
108 3 9 if $@
109 9 0 if defined $intra_country_dial_to
113 0 0 if (defined $from->areacode and defined $to->areacode and $from->areacode eq $to->areacode)
119 0 0 $to->areacode ? :
130 3 31 if $format eq "E123"
133 1 30 if $@
140 6 2 if $country_code and $country_code =~ /[a-z]/i
143 4 4 if $country_code eq $self->country_code
263 1 4763 if exists $_[2]
266 24 4739 if $country =~ /::/
268 2149 2614 if (not defined $number) { }
2610 4 elsif ($country =~ /[a-z]/i) { }
275 2545 65 if $country =~ /^[a-z]{2}$/i
276 12 2598 if ($country =~ /^GMSS::[a-zA-Z]+$/) { }
12 2586 elsif ($country =~ /^InternationalNetworks(88[23])::[a-zA-Z]+$/) { }
1318 1268 elsif (index($number, '+' . Number::Phone::Country::country_code($country)) != 0) { }
277 6 6 unless ($number =~ /^\+881/)
282 6 6 unless ($number =~ /^\+$idd/)
293 4 4759 unless $number =~ /^\+/
295 8 4755 unless $country = Number::Phone::Country::phone2country($number)
296 7 4748 if ($country eq "AQ" and $number =~ /^\+882/)
303 8 4747 if ($country eq "VA" and $original_country eq "IT" or $country =~ /^(IM|GG|JE)$/ and $original_country eq "GB")
316 4 969 unless $country
317 527 442 if ($number =~ /^\+1/) { }
239 203 elsif ($country eq 'GB') { }
62 141 elsif ($country =~ /^(GG|JE|IM)$/) { }
326 125 844 if ($@ or not "Number::Phone::$country"->isa("Number::Phone"))
327 0 125 if ($@ =~ /--without_uk/)
332 0 125 if ($country eq "UK")
333 0 125 if ($country =~ /^UK::(..)/)
341 1 3910 if $NOSTUBS
345 18 3892 if ($@ and $number =~ /^\+881/) { }
8 3884 elsif ($@ and $number =~ /^\+882/ and $country_name ne 'AQ') { }
6 3878 elsif ($@ and $number =~ /^\+883/) { }
7 3871 elsif ($@) { }
358 7 0 if ($local_number eq "")