Condition Coverage

lib/HTML/HTML5/Parser/UA.pm
Criterion Covered Total %
condition 9 29 31.0


and 3 conditions

line !l l&&!r l&&r condition
22 8 0 0 ref $ua and $ua->isa('HTTP::Tiny')
8 0 0 ref $ua and $ua->isa('HTTP::Tiny') and $uri =~ /^https?:/i
24 8 0 0 ref $ua and $ua->isa('LWP::UserAgent')
26 0 3 5 UNIVERSAL::can('LWP::UserAgent', 'can') and not $NO_LWP

or 2 conditions

line l !l condition
131 0 0 $content_type ||= 'text/xml'
132 0 0 $content_type ||= 'application/xhtml+xml'
133 0 0 $content_type ||= 'text/html'
134 0 1 $content_type ||= 'application/octet-stream'

or 3 conditions

line l !l&&r !l&&!r condition
44 0 5 0 $ua ||= 'LWP::UserAgent'->new('agent', sprintf('%s/%s ', 'HTML::HTML5::Parser', 'HTML::HTML5::Parser'->VERSION), 'default_headers', 'HTTP::Headers'->new('Accept', 'text/html, application/xhtml+xml;q=0.9, application/xml;q=0.1, text/xml;q=0.1'), 'parse_head', 0)
82 0 2 0 $ua ||= 'HTTP::Tiny'->new('agent', sprintf('%s/%s', 'HTML::HTML5::Parser', 'HTML::HTML5::Parser'->VERSION), 'default_headers', {'Accept', 'text/html, application/xhtml+xml;q=0.9, application/xml;q=0.1, text/xml;q=0.1'})
124 0 1 0 $content ||= do { if (open my $fh, '<', $file) { local $/ = readline $fh; } else { $status = 418; $reason = q[I'm a teapot]; $content_type = 'text/plain'; $!; } }