Branch Coverage

blib/lib/WWW/Mechanize/Cached.pm
Criterion Covered Total %
branch 27 56 48.2


line true false branch
61 9 0 if 'HASH' ne ref $_[0] and $_[0]->can('get') and $_[0]->can('set')
76 2 0 if eval { do { &use_module('Cache::FileCache') } }
82 0 0 if eval { do { &use_module('CHI') } }
138 2 2 unless $self->is_cached
141 0 2 unless $request
144 0 2 $self->cache->get($request) ? :
160 0 0 unless my $handler = $self->{'onwarn'}
162 0 0 if $self->quiet
164 0 0 if ($self->_verbose_dwarn) { }
183 0 30 unless $response
184 0 30 unless $self->positive_cache
186 0 30 if $response->code < 200
187 0 30 if $response->code > 301
191 3 27 if ($headers->header('Client-Transfer-Encoding'))
201 2 1 if $cte eq 'chunked'
208 10 18 unless (defined $size)
209 0 10 if ($self->cache_undef_content_length . '' eq 'warn')
217 10 0 if ($self->cache_undef_content_length == 0)
222 0 18 if (defined $size and $size == 0)
223 0 0 if ($self->cache_zero_content_length . '' eq 'warn')
231 0 0 if ($self->cache_zero_content_length == 0)
236 0 18 if (defined $size and $size != 0 and $size != length $response->content)
239 0 0 if ($self->cache_mismatch_content_length . '' eq 'warn')
245 0 0 if ($self->cache_mismatch_content_length == 0)
258 27 36 unless $response
259 2 34 unless $self->positive_cache
261 0 34 if $response->code < 200
262 1 33 if $response->code > 301