Branch Coverage

blib/lib/URI/_server.pm
Criterion Covered Total %
branch 66 72 91.6


line true false branch
14 491 358 if ($str =~ m[^((?:$URI::scheme_re:)?)//([^/?\#]*)(.*)$]so)
16 19 472 $host =~ s/(.*@)// ? :
17 20 471 $host =~ s/(:\d+)\z// ? :
18 5 486 if (_host_escape($host))
27 522 6 unless $_[0] =~ /[^$URI::uric4host]/
32 1 5 if $@
39 5 10 if ($str =~ /\bxn--/)
40 5 0 if ($str =~ m[^((?:$URI::scheme_re:)?)//([^/?\#]*)(.*)$]so)
42 0 5 $host =~ s/(.*@)// ? :
43 0 5 $host =~ s/(:\d+)\z// ? :
57 28 66 if (@_)
59 0 28 unless defined $new
62 26 2 if (defined $ui)
68 18 76 unless defined $old and $old =~ /(.*)@/
76 38 443 if (@_)
78 3 35 unless defined $tmp
79 17 21 $tmp =~ /(.*@)/ ? :
80 15 23 $tmp =~ /(:\d+)$/ ? :
82 1 37 unless defined $new
83 37 1 if (length $new)
85 5 32 if ($new =~ /^[^:]*:\d*\z/ or $new =~ /]:\d*\z/)
86 0 5 unless $new =~ s/(:\d*)\z//
89 11 26 if $new =~ /:/ and not $new =~ /^\[/
94 78 403 unless defined $old
105 3 2 if ($old =~ /(^|\.)xn--/)
116 39 449 if (@_)
120 23 16 if defined $port
123 67 421 if defined $old and $old =~ /:(\d*)$/
131 59 39 if not defined $port or $port eq ""
139 3 7 if @_
140 0 10 unless defined $old
143 6 4 unless $old =~ /:\d+$/
159 19 370 if ($uc_host or $def_port)
160 7 12 if $other == $self
161 15 4 if $uc_host
162 9 10 if $def_port