Branch Coverage

blib/lib/Number/Phone/Normalize.pm
Criterion Covered Total %
branch 62 74 83.7


line true false branch
32 120 151 if ($number =~ /^$prefix/) { }
46 0 99 if ref $class
50 232 0 if (my $accessor = $self->can($_)) { }
64 93 136 unless ref $self
65 0 136 if %param
75 85 10 unless $self->VanityOK
80 11 84 if $has_prefix
81 0 84 unless $number
85 6 78 if ($nn = _remove_prefix($number, $self->IntlPrefix)) { }
29 49 elsif ($nn = _remove_prefix($number, $self->LDPrefix) and defined $self->CountryCode) { }
23 52 elsif (defined $self->CountryCode and defined $self->AreaCode) { }
103 124 10 unless $self->VanityOK
107 0 134 unless $number ne ''
111 68 66 if ($has_prefix) { }
115 21 47 if (defined $self->CountryCodeOut and defined $self->AreaCodeOut and not $self->AlwaysLD and $nn = _remove_prefix($number, $self->CountryCodeOut . $self->AreaCodeOut)) { }
32 15 elsif ($self->CountryCodeOut and $nn = _remove_prefix($number, $self->CountryCodeOut)) { }
131 40 26 if defined $_[1]
133 4 22 if (defined $self->AreaCodeOut and not $self->AlwaysLD and $nn = _remove_prefix($number, $self->LDPrefix . $self->AreaCodeOut)) { }
12 10 elsif ($nn = _remove_prefix($number, $self->LDPrefix)) { }
1 9 elsif (defined $self->AreaCode and defined $self->AreaCodeOut and $self->AreaCode ne $self->AreaCodeOut) { }
2 7 elsif ($self->AlwaysLD and defined $self->AreaCodeOut) { }
157 0 107 defined $$self{'IntlPrefix'} ? :
158 0 107 if @_
164 0 159 defined $$self{'LDPrefix'} ? :
165 0 159 if @_
171 0 23 defined $$self{'IntlPrefixOut'} ? :
172 8 15 if @_
178 0 47 defined $$self{'LDPrefixOut'} ? :
179 0 47 if @_
186 75 322 if @_
193 82 232 if @_
199 21 176 defined $$self{'CountryCodeOut'} ? :
200 7 190 if @_
206 36 168 $$self{'AreaCodeOut'} ? :
207 18 186 if @_
214 18 229 if @_
221 24 85 if @_