Condition Coverage

blib/lib/Mojo/UserAgent/Cached.pm
Criterion Covered Total %
condition 29 73 39.7


and 2 conditions

line l !l condition
288 0 0 $self->logger->debug("Illegal cache key: $key") and return
305 0 1 $self->logger->debug("Illegal cache key: $key") and return

and 3 conditions

line !l l&&!r l&&r condition
166 23 74 3 $self->{'pid'} and $self->{'pid'} ne $$
176 12 0 88 not $url =~ m[ \A file:// ]gmux and 'Mojo::URL'->new($url)->is_abs || $url =~ m[ \A / ]gmux && !$self->always_return_file
238 0 61 13 $tx->req->url->scheme ne "file" and $self->is_cacheable($key)
314 0 122 11 $self->cache_agent && !($url =~ m[ \A / ]gmux)
335 7 4 2 $tx->error and $self->accepted_error_codes
427 100 0 0 $dir and -e $dir
100 0 0 $dir and -e $dir and -d $dir

or 3 conditions

line l !l&&r !l&&!r condition
137 2 99 0 $self->always_return_file || $url
161 7 25 68 $content || ()
167 74 26 0 $self->{'pid'} //= $$
176 6 82 0 'Mojo::URL'->new($url)->is_abs || $url =~ m[ \A / ]gmux && !$self->always_return_file
281 1 8 0 $opts || ()
388 15 13 0 $tx->res->headers->header('X-Mojo-UserAgent-Cached') || $now
465 0 9 0 $tx->res->code || $tx->res->error->{'code'} || $tx->res->error->{'message'}
475 0 0 0 $tx->req->url->host || $NONE
477 0 0 0 POSIX::strftime('%d/%b/%Y:%H:%M:%S %z', localtime) || $NONE
478 0 0 0 $tx->req->method . ' ' . $tx->req->url->path_query || $NONE
479 0 0 0 $tx->res->code || $NONE
480 0 0 0 length $tx->res->body || $NONE
481 0 0 0 $callers || $NONE
482 0 0 0 'Mojo::UserAgent::Cached(' . $opts->{'type'} . ')' || $NONE
483 0 0 0 $elapsed_time || $NONE
484 0 0 0 $elapsed_time || $NONE