Branch Coverage

blib/lib/Class/Multimethods.pm
Criterion Covered Total %
branch 57 302 18.8


line true false branch
43 8 20 unless eval "defined &${pkg}::$name"
1 0 if $code
0 0 if index($types[$i], 'Class::Multimethods::SUPERCLASS') == 0
0 0 if @code
0 0 if (@code == 0 and $Class::Multimethods::hasgeneric{'mm'})
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'mm'}{$handler}
0 0 if (defined $handler)
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'mm'}{$handler}
0 0 if (defined $handler)
0 0 if (@code == 1) { }
0 0 elsif (@code > 1) { }
32 220 if $code
0 222 if index($types[$i], 'Class::Multimethods::SUPERCLASS') == 0
0 0 if @code
0 220 if (@code == 0 and $Class::Multimethods::hasgeneric{'mm'})
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'mm'}{$handler}
0 12 if (defined $handler)
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'mm'}{$handler}
0 183 if (defined $handler)
25 195 if (@code == 1) { }
12 183 elsif (@code > 1) { }
2 0 if $code
0 0 if index($types[$i], 'Class::Multimethods::SUPERCLASS') == 0
0 0 if @code
0 0 if (@code == 0 and $Class::Multimethods::hasgeneric{'mm'})
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'mm'}{$handler}
0 0 if (defined $handler)
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'mm'}{$handler}
0 0 if (defined $handler)
0 0 if (@code == 1) { }
0 0 elsif (@code > 1) { }
4 0 if $code
0 0 if index($types[$i], 'Class::Multimethods::SUPERCLASS') == 0
0 0 if @code
0 0 if (@code == 0 and $Class::Multimethods::hasgeneric{'new'})
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'new'}{$handler}
0 0 if (defined $handler)
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'new'}{$handler}
0 0 if (defined $handler)
0 0 if (@code == 1) { }
0 0 elsif (@code > 1) { }
2 0 if $code
0 0 if index($types[$i], 'Class::Multimethods::SUPERCLASS') == 0
0 0 if @code
0 0 if (@code == 0 and $Class::Multimethods::hasgeneric{'set'})
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'set'}{$handler}
0 0 if (defined $handler)
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'set'}{$handler}
0 0 if (defined $handler)
0 0 if (@code == 1) { }
0 0 elsif (@code > 1) { }
0 3 if $code
0 3 if index($types[$i], 'Class::Multimethods::SUPERCLASS') == 0
0 0 if @code
0 3 if (@code == 0 and $Class::Multimethods::hasgeneric{'set'})
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'set'}{$handler}
0 0 if (defined $handler)
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'set'}{$handler}
0 0 if (defined $handler)
3 0 if (@code == 1) { }
0 0 elsif (@code > 1) { }
3 1 if $code
0 1 if index($types[$i], 'Class::Multimethods::SUPERCLASS') == 0
0 0 if @code
0 1 if (@code == 0 and $Class::Multimethods::hasgeneric{'val'})
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'val'}{$handler}
0 0 if (defined $handler)
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'val'}{$handler}
0 0 if (defined $handler)
1 0 if (@code == 1) { }
0 0 elsif (@code > 1) { }
2 79 if $code
0 79 if index($types[$i], 'Class::Multimethods::SUPERCLASS') == 0
61 0 if @code
61 18 if (@code == 0 and $Class::Multimethods::hasgeneric{'wild'})
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'wild'}{$handler}
0 3 if (defined $handler)
0 0 if ref $handler
0 0 if defined $Class::Multimethods::dispatch{'wild'}{$handler}
0 0 if (defined $handler)
76 3 if (@code == 1) { }
3 0 elsif (@code > 1) { }
52 0 0 if (@_ == 1 and ref $_[0] eq 'CODE') { }
61 0 0 if (@_ == 1 and ref $_[0] eq 'CODE') { }
73 0 0 if @_ <= 1
74 0 0 @_ > 1 ? :
81 198 0 unless $_[0] =~ s/Class::Multimethods::SUPERCLASS_IS:://
95 26 1 if (@_)
98 0 26 unless ref $code eq 'CODE'
104 6 20 if not defined $_ or @types > $_
106 5 21 if not defined $_ or @types < $_
112 0 26 if $^W and exists $Class::Multimethods::dispatch{$name}{$sig}
266 0 1683 if $$tried{$sig}
272 135 1548 if ($match and ref $match eq 'CODE')
285 1519 29 unless (@$matches)
289 153 2895 if $$candidate[$i] =~ /[^\w:#]/
292 2 2893 if ($$candidate[$i] eq '#') { }
0 2893 elsif ($$candidate[$i] =~ /\AClass::Multimethods::SUPERCLASS_IS::(.+)/) { }
0 2893 elsif ($$candidate[$i] =~ /\AClass::Multimethods::SUPERCLASS_OF::(.+)/) { }
297 0 0 $1 eq '#' ? :
314 1010 120 unless @$matches
348 0 0 unless /::$/ and $_ ne $self
351 0 0 unless $_[0]
402 0 0 unless $Class::Multimethods::min_args{$multimethod}
408 0 0 if $typeset =~ /\*/
414 0 0 unless exists $ignore{$ancestor}
440 0 0 if @paramlists == 1
461 0 0 if $ambiguous_handler and ref $ambiguous_handler ne 'CODE'
463 0 0 if $no_match_handler and ref $no_match_handler ne 'CODE'
466 0 0 if ($case_count) { }
471 0 0 ref $_ eq 'ARRAY' ? :
481 0 0 unless ($case_count)
506 0 0 unless $$a{'wrong_length'} - $$b{'wrong_length'} or @{$$a{'incomp'};} - @{$$b{'incomp'};} or $$a{'generic'} - $$b{'generic'}
515 0 0 if ($ordered[0] and not @{$ordered[0]{'incomp'};})
520 0 0 if @{$ordered[$i]{'incomp'};} or $ordered[$i]{'wrong_length'} or $ordered[$i]{'sum_dist'} > $ordered[0]{'sum_dist'} or $ordered[$i]{'generic'} != $ordered[0]{'generic'}
528 0 0 if ($i > 1)
541 0 0 if ($winner and $$winner{'ambig'} and $ambiguous_handler) { }
0 0 elsif ($winner and @{$$winner{'incomp'};} || $$winner{'wrong_length'} and $no_match_handler) { }
559 0 0 if ($$variant{'ambig'}) { }
0 0 elsif (@{$$variant{'incomp'};} == 1) { }
0 0 elsif (@{$$variant{'incomp'};}) { }
0 0 elsif ($$variant{'wrong_length'}) { }
0 0 elsif ($first) { }
0 0 elsif ($$variant{'generic'} and $$variant{'sum_dist'} < $min_dist) { }
0 0 elsif ($$variant{'generic'}) { }
562 0 0 if $first
608 0 0 if @ambigs
609 0 0 if @fails
620 0 0 if $from eq $to
621 0 0 if $to eq '*'
622 0 0 if defined $distance{$from}{$to}
624 0 0 if ($parents{$from})
629 0 0 if (defined $distance)
655 0 0 if (@nexttypes != @$types)
666 0 0 if (not defined $nextdist) { }
0 0 elsif ($nextdist < 0) { }