Condition Coverage

blib/lib/Mojolicious/Plugin/LinkEmbedder.pm
Criterion Covered Total %
condition 13 35 37.1


and 3 conditions

line !l l&&!r l&&r condition
177 0 7 0 $url and $url->host
205 4 0 0 $etag and $etag eq ($c->req->headers->etag // '')
217 4 0 0 $ct =~ m[^image/] and $self->_new_link_object('image', $c, {'url', $url, '_tx', $tx}, $cb)
218 4 0 0 $ct =~ m[^video/] and $self->_new_link_object('video', $c, {'url', $url, '_tx', $tx}, $cb)
219 4 0 0 $ct =~ m[^text/plain] and $self->_new_link_object('text', $c, {'url', $url, '_tx', $tx}, $cb)
337 4 0 0 $if_none_match and $if_none_match eq $link->etag
347 0 0 4 not $link->etag and $$config{'max_age'}

or 2 conditions

line l !l condition
149 0 23 $ENV{'MOJO_LINKEMBEDDER_DEBUG'} || 0
166 7 0 $url || ''
201 4 0 $tx->res->headers->content_type || ''
205 0 0 $c->req->headers->etag // ''
319 0 23 $$config{'max_age'} //= 60
338 3 0 $$err{'code'} || 500
339 3 0 $$err{'message'} || 'Unknown error.'