Branch Coverage

blib/lib/LinkEmbedder/Link.pm
Criterion Covered Total %
branch 32 54 59.2


line true false branch
51 0 7 unless my $template = Mojo::Loader::data_section(@{$self->template;})
53 0 7 if ref $output
68 9 23 if $attr =~ /url$/u
71 4 1 unless $self->type eq 'link'
80 12 16 if $DOM_SEL{$sel[0]}
83 48 4 unless my $e = $dom->at($sel)
85 4 0 if defined $val
93 0 5 if $self->force_secure
97 0 5 if $self->force_secure and $tx->res->is_success
107 1 4 if $name
110 0 5 if $ct =~ m[^image/]u
111 0 5 if $ct =~ m[^video/]u
112 1 4 if $ct =~ m[^text/plain]u
113 4 1 if $ct =~ m[^text/html]u
123 0 4 if $v = $self->_el($dom, '[itemprop="author"] [itemprop="name"]')
124 0 4 if $v = $self->_el($dom, '[itemprop="author"] [itemprop="email"]')
125 0 4 if $v = $self->_el($dom, ':desc')
126 0 4 if $v = $self->_el($dom, 'meta[property="og:image:height"]')
127 0 4 if $v = $self->_el($dom, ':image')
128 0 4 if $v = $self->_el($dom, 'meta[property="og:image:width"]')
129 4 0 if $v = $self->_el($dom, ':title')
140 0 0 if defined $self->{'error'} and not ref $self->{'error'}
141 0 0 if $self->{'status'} and $self->{'status'} =~ /^\d+$/u
162 1 0 @$path ? :
168 0 5 unless ref $self eq 'LinkEmbedder::Link::Basic'
169 0 5 unless $self->type eq 'rich'
171 0 5 if ($self->title eq 'Jitsi Meet' or $tx->res->body =~ /\bJitsiMeetJS\b/u)