Branch Coverage

blib/lib/Net/Google/SafeBrowsing4/URI.pm
Criterion Covered Total %
branch 47 48 97.9


line true false branch
58 3 265 if (scalar @args == 0 or not $args[0])
67 244 21 $self->_normalize ? :
102 8 1 unless ($host =~ /^\d+\.\d+\.\d+\.\d+$/)
115 4 5 if ($path ne '/')
118 1 3 $part_count > 4 ? :
129 2 7 if ($query =~ /^\?./)
138 37 0 if (defined $gsb_uri)
187 29 236 unless (ref($uri_obj) =~ /^URI::https?$/)
188 25 4 if (not $uri_obj->scheme or not $uri_obj->has_recognized_scheme and $modified_rawuri =~ m[^[^:]+:\d{1,5}(?:/|$)])
193 4 261 unless (ref($uri_obj) =~ /^URI::https?$/)
207 2 259 if ($modified_host =~ /^\s*$/)
217 11 248 unless (defined $modified_host)
223 1 247 if ($uri_obj->host =~ m[^[\s./]*$])
228 3 244 if ($uri_obj->host =~ /\.\d[^\.]*$/ and not $uri_obj->host =~ /^(?:2(?:5[0-5]|[0-4][0-9])|[01]?[0-9]{1,2})(?:\.(?:2(?:5[0-5]|[0-4][0-9])|[01]?[0-9]{1,2})){3}$/)
240 136 108 if ($modified_path eq '')
286 119 140 unless ($host =~ /^(?:0x[[:xdigit:]]+|\d+)(?:\.(?:0x[[:xdigit:]]+|\d+))*$/is)
292 93 47 if ($ip)
304 80 42 !$is_last_segment ? :
305 11 111 unless (defined $segment)
309 75 36 !$is_last_segment ? :
351 34 88 if ($segment =~ /^0+([0-7]{0,10}|[0-3][0-7]{10})$/) { }
35 53 elsif ($segment =~ /^0x0*([[:xdigit:]]{1,8})$/is) { }
49 4 elsif ($segment =~ /^[1-9]\d+$/) { }
364 7 111 if ($decimal >= 1 << $bits)