Branch Coverage

blib/lib/Data/Validate/URI.pm
Criterion Covered Total %
branch 53 60 88.3


line true false branch
156 2 77 if ref $_[0]
159 0 79 unless defined $value
162 1 78 if $value =~ m<[^a-z0-9\:/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]>i
165 1 77 if $value =~ /%[^0-9a-f]/i
166 3 74 if $value =~ /%[0-9a-f](:?[^0-9a-f]|$)/i
172 0 61 unless defined $scheme and length $scheme and defined $path
175 50 11 if (defined $authority and length $authority) { }
176 0 50 unless length $path == 0 or $path =~ m[^/]
180 1 10 if $path =~ m[^//]
184 1 59 unless lc($scheme) =~ /^[a-z][a-z0-9\+\-\.]*$/
188 49 10 if (defined $authority and length $authority)
192 6 53 if (defined $query and length $query)
195 0 59 if (defined $fragment and length $fragment)
259 2 52 if ref $_[0]
263 8 46 unless is_uri($value)
267 0 46 unless $scheme
269 19 27 if ($allow_https) { }
270 4 15 unless lc $scheme eq 'https'
272 9 18 unless lc $scheme eq 'http'
277 4 29 unless $authority
284 0 29 unless (Data::Validate::Domain::is_domain($authority) or Data::Validate::IP::is_ipv4($authority))
292 4 25 if $port
296 4 25 if (defined $query and length $query)
299 0 29 if (defined $fragment and length $fragment)
348 6 58 if ref $_[0]
446 9 32 if ref $_[0]
484 1 21 if ($value =~ /$rn.*$rn/msx)
487 1 20 if ($value =~ /$npdi.*$npdi/msx)
490 1 19 if ($value =~ /$cic.*$cic/msx)
506 14 5 if ($value =~ /$enum_dip_indicator.*$enum_dip_indicator/msx)