Condition Coverage

blib/lib/Promise/Me.pm
Criterion Covered Total %
condition 140 582 24.0


and 2 conditions

line l !l condition
673 0 6 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
683 0 2 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
822 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
832 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
883 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
896 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
985 32 0 $self->executed and scalar @$vals

and 3 conditions

line !l l&&!r l&&r condition
264 0 28 0 @_ >= 2 and not ref $_[0]
28 0 0 @_ >= 2 and not ref $_[0] and ref $_[1] eq "CODE"
382 0 0 0 scalar @_ == 1 && &Scalar::Util::reftype($_[0]) eq 'ARRAY'
489 0 4 29317 defined $pid and exists $Promise::Me::KIDS->{$pid}
549 0 18 0 scalar @_ == 1 and not defined $_[0]
633 8 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
643 0 2 4 scalar @rv and &Scalar::Util::blessed($rv[0])
2 4 0 scalar @rv and &Scalar::Util::blessed($rv[0]) and $rv[0]->isa("Promise::Me")
0 2 4 scalar @rv and &Scalar::Util::blessed($rv[0])
2 0 4 scalar @rv and &Scalar::Util::blessed($rv[0]) and $exception_class
2 4 0 scalar @rv and &Scalar::Util::blessed($rv[0]) and $exception_class and $rv[0]->isa($exception_class)
673 8 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
683 2 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
8 0 0 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
750 0 0 0 scalar @_ and &Scalar::Util::blessed($_[0])
0 0 0 scalar @_ and &Scalar::Util::blessed($_[0]) and $_[0]->isa("Promise::Me")
764 0 0 0 &Scalar::Util::blessed($tied) and $tied->isa("Promise::Me::Share")
801 2 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
805 0 2 0 scalar @rv and &Scalar::Util::blessed($rv[0])
2 0 0 scalar @rv and &Scalar::Util::blessed($rv[0]) and $rv[0]->isa("Promise::Me")
822 2 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
832 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 2 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
2 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
855 8 0 8 defined $code and ref $code
861 8 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
866 0 6 2 scalar @rv and &Scalar::Util::blessed($rv[0])
6 2 0 scalar @rv and &Scalar::Util::blessed($rv[0]) and $rv[0]->isa("Promise::Me")
883 8 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
896 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 8 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
8 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
909 0 6 2 @_ == 1 && ref $_[0]
944 0 12 0 scalar @_ and &Scalar::Util::blessed($_[0])
12 0 0 scalar @_ and &Scalar::Util::blessed($_[0]) and $_[0]->isa("Promise::Me")
975 0 32 0 scalar @_ == 1 and not defined $_[0]
980 32 0 0 defined $fail and ref $fail ne "CODE"
1011 0 0 0 scalar @_ and &Scalar::Util::blessed($_[0])
0 0 0 scalar @_ and &Scalar::Util::blessed($_[0]) and $_[0]->isa("Promise::Me")
1025 0 0 0 &Scalar::Util::blessed($tied) and $tied->isa("Promise::Me::Share")
1037 0 0 0 scalar @_ and &Scalar::Util::blessed($_[0])
0 0 0 scalar @_ and &Scalar::Util::blessed($_[0]) and $_[0]->isa("Promise::Me")
1104 0 0 0 $e->can("children") and $e->children
1118 0 0 35 &Scalar::Util::blessed($elem) and $elem->isa("PPI::Node")
1127 34899 0 1415 $this->class eq "PPI::Statement" and substr($this->content, 0, 5) ne "async"
1132 59163 5736 0 $that->class eq 'PPI::Token::Word' && $that->content eq 'async'
1147 0 0 0 $e->class eq "PPI::Token::Word" and $e->content eq "async"
1150 0 0 0 $e->snext_sibling and $e->snext_sibling->class eq "PPI::Token::Word"
0 0 0 $e->snext_sibling and $e->snext_sibling->class eq "PPI::Token::Word" and $e->snext_sibling->content eq "sub"
1178 34899 1415 0 $this->class eq 'PPI::Statement' && substr($this->content, 0, 5) eq 'async'
1210 0 0 0 scalar @$tmp_nodes and $sib->class eq "PPI::Structure::Block"
0 0 0 not scalar @$tmp_nodes and $sib->class eq "PPI::Token::Word"
0 0 0 not scalar @$tmp_nodes and $sib->class eq "PPI::Token::Word" and $sib->content eq "async"
1232 0 0 0 $sib->snext_sibling and $sib->snext_sibling->class eq "PPI::Token::Word"
0 0 0 $sib->snext_sibling and $sib->snext_sibling->class eq "PPI::Token::Word" and $sib->snext_sibling->content eq "sub"
1269 0 0 0 $this = $this->previous_sibling and $this->class eq "PPI::Token::Whitespace"
1304 18 0 0 not defined $rv and $shm->error
1341 0 0 0 defined $val and length $val
1364 12 0 0 scalar @_ and ref $_[-1] eq "HASH"
1370 12 0 0 exists $opts->{'fallback'} and length $opts->{'fallback'}
1387 0 0 6 &Scalar::Util::blessed($tied) and $tied->isa("Promise::Me::Share")
1413 0 0 6 defined $serialiser and $serialiser eq 'sereal' || $serialiser eq 'storable' || $serialiser eq 'cbor'
1427 0 0 6 defined $size and length $size
0 0 6 defined $size and length $size and int $size > 0
1428 0 3 3 "Module::Generic::SharedMemXS"->supported and not $opts->{'use_cache_file'}
1540 0 0 28 defined $serialiser and $serialiser eq 'sereal' || $serialiser eq 'storable' || $serialiser eq 'cbor'
1554 0 0 28 defined $size and length $size
0 0 28 defined $size and length $size and int $size > 0
1558 0 7 3 defined $self->{'medium'} && $self->{'medium'} eq 'memory' || !($self->{'use_cache_file'} || $self->{'use_mmap'}) && $self->{'medium'} ne 'file' && $self->{'medium'} ne 'mmap' and $self->is_child
1569 0 18 10 "Module::Generic::SharedMemXS"->supported and not $self->{'use_cache_file'}
18 0 10 "Module::Generic::SharedMemXS"->supported and not $self->{'use_cache_file'} and $self->{'medium'} ne "file"
1624 0 0 0 $destroy and $child
0 0 0 $destroy and $child and length $status
0 0 0 $destroy and $child and length $status and $shm
1661 0 0 6 $o->shared_space_destroy and $shm = $o->shared_mem
0 4 2 $o->shared_space_destroy and $shm = $o->shared_mem and $shm->isa('Module::Generic::SharedMem') || $shm->isa('Module::Generic::SharedMemXS')
1676 0 0 2 &Scalar::Util::blessed($tied) and $tied->isa("Promise::Me::Share")
2128 0 0 16 defined $repo and length $repo
2129 16 0 0 ref $repo ne "HASH" and $self->_warnings_is_enabled
2154 0 0 0 defined $repo and length $repo
2155 0 0 0 ref $repo ne "HASH" and $self->_warnings_is_enabled
2175 0 0 16 defined $repo and length $repo
2176 16 0 0 ref $repo ne "HASH" and $self->_warnings_is_enabled
2188 0 0 0 defined $repo and length $repo
2189 0 0 0 ref $repo ne "HASH" and $self->_warnings_is_enabled
2209 0 0 10 defined $repo and length $repo
2210 10 0 0 ref $repo ne "HASH" and $self->_warnings_is_enabled
2225 0 0 0 defined $repo and length $repo
2226 0 0 0 ref $repo ne "HASH" and $self->_warnings_is_enabled
2251 0 0 24 exists $opts->{'shm'} and length $opts->{'shm'}
0 0 24 exists $opts->{'shm'} and length $opts->{'shm'} and &Scalar::Util::blessed($opts->{'shm'})
2252 0 0 24 length $opts->{'type'} and length $opts->{'type'}
2313 0 0 0 $serialiser eq "Sereal" and "Sereal::Encoder"->VERSION <= "version"->parse("4.023")
2324 0 0 0 scalar @args == 1 && ref $args[0] eq 'ARRAY'
2325 0 0 0 defined $ref && ref $ref eq 'ARRAY' && scalar @$ref > 1

or 2 conditions

line l !l condition
225 35 0 'PPI::Document'->new(\$code, 'readonly', 1) || die('Unable to parse: ', 'PPI::Document'->errstr, "\n$code\n")
350 0 0 shift @_ || (return $self->error('No code reference was provided to add a final handler.'))
359 32 0 shift @_ || (return $self->error('No code reference was provided to add a resolve handler.'))
368 18 0 shift @_ || (return $self->error('No code reference was provided to add a reject handler.'))
380 0 0 $opts->{'timeout'} //= 0
381 0 0 $opts->{'race'} //= 0
473 0 2 $opts->{'timeout'} //= 3
591 20 0 $self->_set_shared_space || (return $self->pass_error)
717 18 0 shift @_ || (return $self->error('No type provided to get its next handler.'))
983 32 0 $self->{'_saved_values'} || []
1099 0 0 shift @_ || 0
1136 0 35 $sts ||= []
1165 0 0 'PPI::Document'->new(\$code, 'readonly', 1) || die('Unable to parse: ', 'PPI::Document'->errstr, "\n$code\n")
1180 0 35 $ref ||= []
1214 0 0 'PPI::Document'->new(\$code, 'readonly', 1) || die('Unable to parse: ', 'PPI::Document'->errstr, "\n$code\n")
1280 0 0 'PPI::Document'->new(\$code, 'readonly', 1) || die('Unable to parse: ', 'PPI::Document'->errstr, "\n$code\n")
1304 0 0 $self->{'serialiser'} // ""
1431 0 0 'Module::Generic::File::Mmap'->new(%$p) || (return 'Promise::Me'->pass_error('Module::Generic::File::Mmap'->error))
1433 0 0 $s->open || (return 'Promise::Me'->pass_error($s->error))
1438 3 0 'Module::Generic::SharedMemXS'->new(%$p) || (return 'Promise::Me'->error('Unable to create shared memory object: ', 'Module::Generic::SharedMemXS'->error))
1444 0 0 'Module::Generic::File::Cache'->new(%$p) || (return 'Promise::Me'->error('Unable to create a shared cache file or a shared memory: ', 'Module::Generic::File::Cache'->error))
1446 0 0 $c->open || (return 'Promise::Me'->error('Unable to create a shared cache file: ', $c->error))
1461 3 0 'Module::Generic::File::Cache'->new(%$p) || (return 'Promise::Me'->error('Unable to create a shared cache file: ', 'Module::Generic::File::Cache'->error))
1463 3 0 $c->open || (return 'Promise::Me'->error('Unable to create a shared cache file: ', $c->error))
1528 28 0 $self->{'shared_key'} || (return $self->error('No shared key found!'))
1571 0 0 'Module::Generic::File::Mmap'->new(%$p) || (return $self->pass_error('Module::Generic::File::Mmap'->error))
1573 0 0 $s->open || (return $self->pass_error($s->error))
1578 10 0 'Module::Generic::SharedMemXS'->new(%$p) || (return $self->error('Unable to create shared memory object: ', 'Module::Generic::SharedMemXS'->error))
1585 0 0 'Module::Generic::File::Cache'->new(%$p) || (return $self->error('Unable to create shared cache file object: ', 'Module::Generic::File::Cache'->error))
1586 0 0 $s->open || (return $self->error('Unable to open shared cache file object: ', $s->error))
1602 18 0 'Module::Generic::File::Cache'->new(%$p) || (return $self->error('Unable to create shared cache file object: ', 'Module::Generic::File::Cache'->error))
1603 18 0 $s->open || (return $self->error('Unable to open shared cache file object: ', $s->error))
1809 0 0 $self->load || (return $self->pass_error)
1839 0 0 $self->load || (return $self->pass_error)
1869 6 0 $self->load || (return $self->pass_error)
1896 0 0 $self->load || (return $self->pass_error)
1918 0 0 $self->load || (return $self->pass_error)
1948 0 0 $self->load || (return $self->pass_error)
1968 0 0 $self->load || (return $self->pass_error)
1987 0 0 $self->load || (return $self->pass_error)
2001 0 0 $self->load || (return $self->pass_error)
2022 0 0 $self->load || (return $self->pass_error)
2042 10 0 $self->load || (return $self->pass_error)
2079 0 0 $self->load || (return $self->pass_error)
2099 0 0 $self->load || (return $self->pass_error)
2125 16 0 $self->shared || (return $self->error('No shared memory object found.'))
2129 0 0 $repo // ""
2130 16 0 $self->addr || (return $self->error('No variable address found!'))
2151 0 0 $self->shared || (return $self->error('No shared memory object found.'))
2155 0 0 $repo // ""
2156 0 0 $self->addr || (return $self->error('No variable address found!'))
2172 16 0 $self->shared || (return $self->error('No shared memory object found.'))
2176 0 0 $repo // ""
2177 16 0 $self->addr || (return $self->error('No variable address found!'))
2185 0 0 $self->shared || (return $self->error('No shared memory object found.'))
2189 0 0 $repo // ""
2190 0 0 $self->addr || (return $self->error('No variable address found!'))
2204 10 0 $self->shared || (return $self->error('No shared memory object found.'))
2207 10 0 $self->addr || (return $self->error('No variable address found!'))
2210 0 0 $repo // ""
2222 0 0 $self->shared || (return $self->error('No shared memory object found.'))
2226 0 0 $repo // ""
2227 0 0 $self->addr || (return $self->error('No variable address found!'))
2267 24 0 $opts->{'debug'} // 0
2295 0 0 shift @_ // ""

or 3 conditions

line l !l&&r !l&&!r condition
140 0 0 34 $_[$i] eq "debug" or $_[$i] eq "debug_code"
0 0 34 $_[$i] eq "debug" or $_[$i] eq "debug_code" or $_[$i] eq "debug_file"
0 0 34 $_[$i] eq "debug" or $_[$i] eq "debug_code" or $_[$i] eq "debug_file" or $_[$i] eq "no_filter"
153 0 35 0 ref $class || $class
167 0 0 0 warnings::enabled() or $Promise::Me::DEBUG
269 0 0 28 not defined $code or ref $code ne "CODE"
377 0 0 0 ref $this or $this ne "Promise::Me"
504 4 0 0 $prom->resolved or $prom->rejected
599 0 0 0 kill 0, $pid or $!{'EPERM'}
683 0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
782 0 0 0 ref $this or $this ne "Promise::Me"
832 0 2 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
896 0 8 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
923 0 0 0 warnings::enabled() or $self->debug
952 0 0 0 warnings::enabled() or $Promise::Me::DEBUG
1000 22 0 10 Want::want("OBJECT") or $self->executed
1072 0 0 0 Want::want("VOID") or Want::want("SCALAR")
1367 0 12 0 $opts->{'medium'} //= $Promise::Me::SHARE_MEDIUM
1368 0 6 6 $opts->{'use_cache_file'} //= $opts->{'medium'} eq "file" ? 1 : 0
1369 0 0 12 $opts->{'use_mmap'} //= $opts->{'medium'} eq "mmap" ? 1 : 0
1413 6 0 0 $serialiser eq 'sereal' || $serialiser eq 'storable' || $serialiser eq 'cbor'
1428 0 0 6 $opts->{'use_mmap'} or $opts->{'medium'} eq "mmap"
3 0 3 "Module::Generic::SharedMemXS"->supported and not $opts->{'use_cache_file'} or $opts->{'medium'} eq "memory"
1476 0 0 0 warnings::enabled() or $Promise::Me::DEBUG
1507 0 0 0 warnings::enabled() or $Promise::Me::DEBUG
1540 28 0 0 $serialiser eq 'sereal' || $serialiser eq 'storable' || $serialiser eq 'cbor'
1558 10 3 15 defined $self->{'medium'} && $self->{'medium'} eq 'memory' || !($self->{'use_cache_file'} || $self->{'use_mmap'}) && $self->{'medium'} ne 'file' && $self->{'medium'} ne 'mmap'
1569 0 0 28 $self->{'use_mmap'} or $self->{'medium'} eq "mmap"
10 0 18 "Module::Generic::SharedMemXS"->supported and not $self->{'use_cache_file'} and $self->{'medium'} ne "file" or $self->{'medium'} eq "memory"
1627 0 0 0 $shm->isa("Module::Generic::SharedMem") or $shm->isa("Module::Generic::SharedMemXS")
1661 0 2 4 $shm->isa('Module::Generic::SharedMem') || $shm->isa('Module::Generic::SharedMemXS')
1738 6 0 0 $class->_tie($opts) || do {
1752 6 0 0 $class->_tie($opts) || do {
1766 12 0 0 $class->_tie($opts) || do {
1862 0 0 6 $locked or $self->{'_iterating'}
2157 0 0 0 not exists $repo->{'_lock'} or ref $repo->{'_lock'} ne "HASH"
2160 0 0 0 warnings::enabled() or $Promise::Me::Share::DEBUG
2178 16 0 0 not exists $repo->{'_lock'} or ref $repo->{'_lock'} ne "HASH"
2268 0 24 0 ref $class || $class
2296 0 0 0 ref $self || $self
2325 0 0 0 ref $self || $self