Condition Coverage

blib/lib/Class/Multimethods.pm
Criterion Covered Total %
condition 55 195 28.2


and 3 conditions

line !l l&&!r l&&r condition
43 0 0 0 @code == 0 and $Class::Multimethods::hasgeneric{'mm'}
37 183 0 @code == 0 and $Class::Multimethods::hasgeneric{'mm'}
0 0 0 @code == 0 and $Class::Multimethods::hasgeneric{'mm'}
0 0 0 @code == 0 and $Class::Multimethods::hasgeneric{'new'}
0 0 0 @code == 0 and $Class::Multimethods::hasgeneric{'set'}
3 0 0 @code == 0 and $Class::Multimethods::hasgeneric{'set'}
1 0 0 @code == 0 and $Class::Multimethods::hasgeneric{'val'}
18 0 61 @code == 0 and $Class::Multimethods::hasgeneric{'wild'}
52 0 0 0 @_ == 1 and ref $_[0] eq 'CODE'
61 0 0 0 @_ == 1 and ref $_[0] eq 'CODE'
112 26 0 0 $^W and exists $Class::Multimethods::dispatch{$name}{$sig}
272 1548 0 135 $match and ref $match eq 'CODE'
348 0 0 0 /::$/ and $_ ne $self
461 0 0 0 $ambiguous_handler and ref $ambiguous_handler ne 'CODE'
463 0 0 0 $no_match_handler and ref $no_match_handler ne 'CODE'
515 0 0 0 $ordered[0] and not @{$ordered[0]{'incomp'};}
541 0 0 0 $winner and $$winner{'ambig'}
0 0 0 $winner and $$winner{'ambig'} and $ambiguous_handler
0 0 0 $winner and @{$$winner{'incomp'};} || $$winner{'wrong_length'}
0 0 0 $winner and @{$$winner{'incomp'};} || $$winner{'wrong_length'} and $no_match_handler
559 0 0 0 $$variant{'generic'} and $$variant{'sum_dist'} < $min_dist

or 2 conditions

line l !l condition
43 8 0 eval make_dispatch($pkg, $name) or croak("internal error: $@")
344 0 0 $_[0] || 'main::'
457 0 0 (caller 1)[3] || 'main code'

or 3 conditions

line l !l&&r !l&&!r condition
43 1 0 1 ref $_ || ((~$_ & $_) eq 0 ? '#' : '$')
1 0 0 $Class::Multimethods::dispatch{'mm'}{$sig} || $Class::Multimethods::cached{'mm'}{$sig}
0 0 0 resolve('mm', \@candidates, \@code, \%tried) or not @candidates
0 0 0 resolve('mm', \@candidates, \@code, \%tried) or not @candidates
505 0 3 ref $_ || ((~$_ & $_) eq 0 ? '#' : '$')
20 12 220 $Class::Multimethods::dispatch{'mm'}{$sig} || $Class::Multimethods::cached{'mm'}{$sig}
37 183 510 resolve('mm', \@candidates, \@code, \%tried) or not @candidates
0 0 0 resolve('mm', \@candidates, \@code, \%tried) or not @candidates
3 0 1 ref $_ || ((~$_ & $_) eq 0 ? '#' : '$')
2 0 0 $Class::Multimethods::dispatch{'mm'}{$sig} || $Class::Multimethods::cached{'mm'}{$sig}
0 0 0 resolve('mm', \@candidates, \@code, \%tried) or not @candidates
0 0 0 resolve('mm', \@candidates, \@code, \%tried) or not @candidates
0 0 8 ref $_ || ((~$_ & $_) eq 0 ? '#' : '$')
4 0 0 $Class::Multimethods::dispatch{'new'}{$sig} || $Class::Multimethods::cached{'new'}{$sig}
0 0 0 resolve('new', \@candidates, \@code, \%tried) or not @candidates
0 0 0 resolve('new', \@candidates, \@code, \%tried) or not @candidates
2 0 2 ref $_ || ((~$_ & $_) eq 0 ? '#' : '$')
2 0 0 $Class::Multimethods::dispatch{'set'}{$sig} || $Class::Multimethods::cached{'set'}{$sig}
0 0 0 resolve('set', \@candidates, \@code, \%tried) or not @candidates
0 0 0 resolve('set', \@candidates, \@code, \%tried) or not @candidates
4 0 2 ref $_ || ((~$_ & $_) eq 0 ? '#' : '$')
0 0 3 $Class::Multimethods::dispatch{'set'}{$sig} || $Class::Multimethods::cached{'set'}{$sig}
3 0 3 resolve('set', \@candidates, \@code, \%tried) or not @candidates
0 0 0 resolve('set', \@candidates, \@code, \%tried) or not @candidates
0 0 8 ref $_ || ((~$_ & $_) eq 0 ? '#' : '$')
3 0 1 $Class::Multimethods::dispatch{'val'}{$sig} || $Class::Multimethods::cached{'val'}{$sig}
1 0 1 resolve('val', \@candidates, \@code, \%tried) or not @candidates
0 0 0 resolve('val', \@candidates, \@code, \%tried) or not @candidates
162 0 0 ref $_ || ((~$_ & $_) eq 0 ? '#' : '$')
2 0 79 $Class::Multimethods::dispatch{'wild'}{$sig} || $Class::Multimethods::cached{'wild'}{$sig}
18 61 186 resolve('wild', \@candidates, \@code, \%tried) or not @candidates
61 0 66 resolve('wild', \@candidates, \@code, \%tried) or not @candidates
73 0 0 0 ref $obj || ((~$obj & $obj) eq 0 ? '#' : '$')
104 5 1 20 not defined $_ or @types > $_
106 5 0 21 not defined $_ or @types < $_
110 3 1 22 $Class::Multimethods::hasgeneric{$name} ||= $sig =~ /\*/
506 0 0 0 $$a{'wrong_length'} - $$b{'wrong_length'} or @{$$a{'incomp'};} - @{$$b{'incomp'};}
0 0 0 $$a{'wrong_length'} - $$b{'wrong_length'} or @{$$a{'incomp'};} - @{$$b{'incomp'};} or $$a{'generic'} - $$b{'generic'}
520 0 0 0 @{$ordered[$i]{'incomp'};} or $ordered[$i]{'wrong_length'}
0 0 0 @{$ordered[$i]{'incomp'};} or $ordered[$i]{'wrong_length'} or $ordered[$i]{'sum_dist'} > $ordered[0]{'sum_dist'}
0 0 0 @{$ordered[$i]{'incomp'};} or $ordered[$i]{'wrong_length'} or $ordered[$i]{'sum_dist'} > $ordered[0]{'sum_dist'} or $ordered[$i]{'generic'} != $ordered[0]{'generic'}
541 0 0 0 @{$$winner{'incomp'};} || $$winner{'wrong_length'}