Branch Coverage

blib/lib/URI/tel.pm
Criterion Covered Total %
branch 111 166 66.8


line true false branch
115 270 41 if (@matches = $str =~ /^((?:tel\:)?$GLOBAL_NUMBER)$/) { }
5 36 elsif (@matches = $str =~ /^((?:tel\:)?$LOCAL_NUMBER)$/) { }
31 5 elsif (@matches = $str =~ /^((?:tel\:)?$OTHER)$/) { }
2 3 elsif (@matches = $str =~ /^((?:tel\:)?$VANITY)$/) { }
124 5 0 if length $matches[6]
142 271 40 if ($str =~ /^(?:tel\:)?\+/)
148 271 0 if ($str2 =~ /^\+($IDD_RE)/)
151 271 0 if (exists $COUNTRIES->{$idd})
158 271 9 if ($check eq $idd)
170 1 302 $temp->{'params1'} ? :
303 8 unless length $temp->{'params'}
182 3 308 $orig ne $str ? :
270 41 $temp->{'type'} eq 'global' ? :
36 275 $temp->{'type'} eq 'local' || $temp->{'type'} eq 'other' ? :
31 280 $temp->{'type'} eq 'other' ? :
2 309 $temp->{'type'} eq 'vanity' ? :
1 302 $temp->{'last_param1'} ? :
8 303 $temp->{'last_param'} ? :
186 10 301 if (length $temp->{'params'})
199 10 6 if (lc($p) =~ /^(ext|isdn_subaddress)$/) { }
2 4 elsif (lc $p eq 'phone_context') { }
214 299 2 unless length $hash->{'ext'} or $self->{'is_vanity'}
216 7 304 $temp->{'_has_context_param'} ? :
223 1 47 if length $self->{'cache'}
224 45 2 if length $self->{'subscriber'}
226 21 26 if length $self->{'ext'}
227 0 47 if length $self->{'isdn_subaddress'}
228 31 16 if (length $self->{'context'})
230 15 16 if (not $self->{'_prepend_context'}) { }
1 15 elsif (not $self->{'subscriber'} =~ /^\+\d+/ || $self->{'context'} =~ /[a-zA-Z]+/) { }
242 8 0 if length $priv->{$k}
244 28 19 if scalar @params
257 38 4 unless $str =~ /[a-zA-Z]+/ and $self->is_vanity
264 28 24 $p != -1 ? :
275 20 22 if length $self->{'ext'}
276 0 42 if length $self->{'isdn_subaddress'}
277 26 16 if length $self->{'context'}
289 0 1 unless length $cc
298 1 216 if ($this->{'cc'} eq $cc)
322 27 266 if (@_)
325 0 27 unless ($str =~ /^$DESCRIPTOR$/)
343 2 11 substr($self->{'context'}, 0, 1) eq '+' ? :
8 13 substr($self->{'subscriber'}, 0, 1) eq '+' ? :
347 2 11 substr($uri->{'context'}, 0, 1) eq '+' ? :
8 13 substr($uri->{'subscriber'}, 0, 1) eq '+' ? :
352 6937 1271 if length $k > length $idd
355 10 1261 if (substr($idd, 0, length $k) eq $k)
358 0 10 wantarray ? :
362 0 11 wantarray ? :
373 0 0 if ($err and length $err)
378 0 0 if $caller ne 'URI::tel'
394 21 22 if (@_)
397 0 21 if (length $val and not $val =~ /^[$PHONEDIGIT]+$/)
432 0 21 if (@_)
435 0 0 if (length $val and not $val =~ /^$URIC$/)
454 1 0 if (@_)
466 0 3 if (length $name)
469 0 0 if (defined $val) { }
471 0 0 unless ($name =~ /^$PNAME$/)
476 0 0 if (length $val) { }
478 0 0 unless ($val =~ /^$PVALUE$/)
494 0 0 wantarray ? :
497 0 3 wantarray ? :
503 0 21 if (@_)
506 0 0 if (length $val and not $val =~ /^$TEL_SUBSCRIBER$/)
530 0 0 unless ref $other and $other->isa('URI::tel')
535 0 0 if $sub ne $sub2
538 0 0 if $context ne $context2
541 0 0 if $ext ne $ext2
546 0 0 unless exists $priv2->{$k}
547 0 0 if $priv->{$k} ne $priv2->{$k}
551 0 0 unless exists $priv->{$k}
552 0 0 if $priv2->{$k} ne $priv->{$k}
566 0 10 @_ ? :
571 16 6 defined $_ ? :
579 2 292 if (not %$COUNTRIES)
587 414 504 unless $in or /^\#{2} BEGIN DATA/
588 2 502 if /^\#{2} END DATA/
590 2 500 if /^\#{2} BEGIN DATA/
592 10 490 index($idd, ',') != -1 ? :
605 490 24 unless exists $hash->{$k2}
619 0 0 if (UNIVERSAL::isa($self, 'HASH')) { }
0 0 elsif (UNIVERSAL::isa($self, 'GLOB')) { }