blib/lib/DataLoader.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 34 | 35 | 100.0 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
283 | 46 | 1 | 2 | defined $cache_key_func and (ref $cache_key_func || '') ne 'CODE' |
323 | 22 | 80 | 27 | $self->{'do_cache'} and my $promise = $self->{'promise_cache'}{$cache_key} |
526 | 61 | 1 | 1 | $max_batch_size and @queue > $max_batch_size |
545 | 1 | 1 | 60 | $batch_promise && &blessed($batch_promise) && $batch_promise->can('then') |
595 | 93 | 3 | 6 | &blessed($object) && $object->isa('DataLoader::Error') |
line | l | !l | condition |
---|---|---|---|
268 | 1 | 51 | delete $opts{'batch'} // 1 |
269 | 4 | 48 | delete $opts{'max_batch_size'} // undef |
270 | 5 | 47 | delete $opts{'cache'} // 1 |
271 | 3 | 49 | delete $opts{'cache_key_func'} // undef |
272 | 3 | 49 | delete $opts{'cache_hashref'} // {} |
278 | 50 | 1 | ref $batch_load_func || '' |
283 | 2 | 1 | ref $cache_key_func || '' |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
286 | 1 | 1 | 45 | not ref $cache_map or ref $cache_map ne 'HASH' |
437 | 3 | 8 | 0 | $self->{'promise_cache'}{$cache_key} //= _is_error_object($value) ? 'Mojo::Promise'->reject($value->message) : 'Mojo::Promise'->resolve($value) |