Branch Coverage

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


line true false branch
14 488 358 if ($str =~ m[^((?:$URI::scheme_re:)?)//([^/?\#]*)(.*)$]so)
16 19 469 $host =~ s/(.*@)// ? :
17 20 468 $host =~ s/(:\d+)\z// ? :
18 5 483 if (_host_escape($host))
27 519 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 441 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 401 unless defined $old
105 3 2 if ($old =~ /(^|\.)xn--/)
116 35 445 if (@_)
120 20 15 if defined $port
123 63 417 if defined $old and $old =~ /:(\d*)$/
131 54 37 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 369 if ($uc_host or $def_port)
160 7 12 if $other == $self
161 15 4 if $uc_host
162 9 10 if $def_port