Condition Coverage

blib/lib/DataLoader.pm
Criterion Covered Total %
condition 34 35 100.0


and 3 conditions

line !l l&&!r l&&r condition
247 45 1 2 defined $cache_key_func and (ref $cache_key_func || '') ne 'CODE'
285 22 79 27 $self->{'do_cache'} and my $promise = $self->{'promise_cache'}{$cache_key}
488 60 1 1 $max_batch_size and @queue > $max_batch_size
507 1 1 59 $batch_promise && &blessed($batch_promise) && $batch_promise->can('then')
557 92 3 6 &blessed($object) && $object->isa('DataLoader::Error')

or 2 conditions

line l !l condition
232 1 50 delete $opts{'batch'} // 1
233 4 47 delete $opts{'max_batch_size'} // undef
234 5 46 delete $opts{'cache'} // 1
235 3 48 delete $opts{'cache_key_func'} // undef
236 3 48 delete $opts{'cache_hashref'} // {}
242 49 1 ref $batch_load_func || ''
247 2 1 ref $cache_key_func || ''

or 3 conditions

line l !l&&r !l&&!r condition
250 1 1 44 not ref $cache_map or ref $cache_map ne 'HASH'
399 3 8 0 $self->{'promise_cache'}{$cache_key} //= _is_error_object($value) ? 'Mojo::Promise'->reject($value->message) : 'Mojo::Promise'->resolve($value)