Branch Coverage

lib/HTML/HTML5/Parser/UA.pm
Criterion Covered Total %
branch 15 28 53.5


line true false branch
22 0 0 if (ref $ua and $ua->isa('HTTP::Tiny') and $uri =~ /^https?:/i)
24 0 8 if (ref $ua and $ua->isa('LWP::UserAgent'))
26 5 3 if (UNIVERSAL::can('LWP::UserAgent', 'can') and not $NO_LWP)
28 1 2 if ($uri =~ /^file:/i)
37 0 5 unless (eval 'require LWP::UserAgent; 1')
96 0 2 if ($response->{'headers'}{'content-type'} =~ /charset=(\S+)/)
105 2 0 unless defined $response->{'decoded_content'}
112 1 0 ref $_ ? :
116 0 1 if (not -e $file) { }
0 1 elsif (not -r $file) { }
125 1 0 if (open my $fh, '<', $file) { }
131 0 1 if $file =~ /\.xml$/i
132 0 1 if $file =~ /\.xht(ml)?$/i
133 0 1 if $file =~ /\.html?$/i