Branch Coverage

blib/lib/Multi/Dispatch.pm
Criterion Covered Total %
branch 3 386 0.7


line true false branch
22 0 0 if ($pos > $lastpos) { }
0 0 elsif ($pos == $lastpos) { }
27 0 0 if (index($expected, $_[0]) == -1)
368 0 0 unless (${$src_ref;} =~ s/\A $MULTI_PARSER //oux)
371 0 0 $found{'name'} ? :
374 0 0 $found{'name'} =~ /\bmethod$/u ? :
0 0 $found{'name'} =~ /\bsub$/u ? :
0 0 $keyword ne 'multi' ? :
386 0 0 if ($from and $frommodule) { }
0 0 elsif ($from and $fromname) { }
398 0 0 if ($attrs)
399 0 0 $attrs =~ / : (?&PerlOWS) common \b $PPR::GRAMMAR /oux ? :
400 0 0 $attrs =~ / : (?&PerlOWS) before \b $PPR::GRAMMAR /oux ? :
401 0 0 $attrs =~ / : (?&PerlOWS) permute \b $PPR::GRAMMAR /oux ? :
402 0 0 $attrs =~ / (?&where_attr) (?(DEFINE) $WHERE_ATTR_PARSER ) /oux ? :
406 0 0 !$nextkeyword || $nextkeyword ne $keyword || $nextname ne $name ? :
414 0 0 if ($from) { }
0 0 elsif ($export) { }
416 0 0 $name eq $fromname ? :
417 0 0 if ($keyword eq "multimethod")
424 0 0 unless ($extra_variants)
428 0 0 unless ($extra_variants)
439 0 0 if ($from_info->{'keyword'} ne $keyword)
457 0 0 if $keyword eq "multi" and $common
462 0 0 $before ? :
465 0 0 if ($keyword eq "multimethod" and not $object_pad_active)
466 0 0 $common ? :
472 0 0 $object_pad_active && $keyword eq 'multimethod' ? :
473 0 0 $common ? :
0 0 $declarator eq 'sub' ? :
484 0 0 if ($constraint)
507 0 0 $match{'where_error'} ? :
0 0 $match{'where_class'} eq 'NONVOID' ? :
0 0 $match{'where_class'} eq 'VOID' ? :
0 0 $match{'where_class'} eq 'NONSCALAR' ? :
0 0 $match{'where_class'} eq 'SCALAR' ? :
0 0 $match{'where_class'} eq 'NONLIST' ? :
0 0 $match{'where_class'} eq 'LIST' ? :
0 0 $match{'where_sub'} ? :
0 0 $match{'where_block'} ? :
520 0 0 if ($constraint)
521 0 0 if ($keyword eq "multimethod" and not $object_pad_active)
522 0 0 if ($common) { }
535 0 0 if $declarator eq "sub"
538 0 0 $keyword eq 'multimethod' ? :
543 0 0 $keyword eq 'multimethod' ? :
561 0 0 if ($export) { }
0 0 elsif (not $permute) { }
568 0 0 unless $_->{'optional'}
584 0 0 $keyword eq 'multimethod' && exists $INC{'Object/Pad.pm'} ? :
589 0 0 if ($declarator eq "method")
596 0 0 if (length $signature > 50)
601 0 0 unless ($from)
628 0 0 $body =~ /\b next::variant \b/ux ? :
639 0 0 if ($keyword eq "multi" and not $autofrom)
643 0 0 if (*{$qualified_name;}{"CODE"})
645 0 0 if ($info and $info->{'package'} ne $caller_package)
664 0 0 if ($export)
668 0 0 $^H{'Multi::Dispatch annotate'} ? :
726 0 1 if (grep /\A-?debug\Z/u, @_)
728 0 1 if (grep /\A-?verbose\Z/u, @_)
729 0 1 if (grep /\A-?annotate\Z/u, @_)
746 0 0 if $seen->{$file}++
761 0 0 if $line{$linenum}
791 0 0 unless keys %Multi::Dispatch::____STATEEND
796 0 0 if $assign
799 0 0 unless $state_var =~ / \A state \s*+ (?> (? (? [\$\@%]) \s*+ \w++ ) \s*+ | \( \s*+ (? [^)]*+ ) \s*+ \) ) /msux
808 0 0 if (exists $cap{'single'}) { }
0 0 elsif (exists $+{'multiple'}) { }
810 0 0 $assign ? :
854 0 0 if $sig1 eq $sig2
857 0 0 if ($narrowness > 0) { }
0 0 elsif ($narrowness < 0) { }
884 0 0 $Multi::Dispatch::b->{'pack'}->isa($Multi::Dispatch::a->{'pack'}) ? :
0 0 $Multi::Dispatch::a->{'pack'}->isa($Multi::Dispatch::b->{'pack'}) ? :
0 0 $Multi::Dispatch::a->{'pack'} eq $Multi::Dispatch::b->{'pack'} ? :
0 0 unless $Multi::Dispatch::b->{'prec'} cmp $Multi::Dispatch::a->{'prec'} or $Multi::Dispatch::a->{'pack'} eq $Multi::Dispatch::b->{'pack'} ? 0 : ($Multi::Dispatch::a->{'pack'}->isa($Multi::Dispatch::b->{'pack'}) ? -1 : ($Multi::Dispatch::b->{'pack'}->isa($Multi::Dispatch::a->{'pack'}) ? 1 : 0))
896 0 0 $x->$#* < $y->$#* ? :
899 0 0 if (not defined $xn || defined $yn) { }
0 0 elsif (defined $xn and not defined $yn) { }
0 0 elsif (not defined $xn and defined $yn) { }
0 0 elsif (ref $xn and ref $yn) { }
0 0 elsif (not ref $xn || ref $yn) { }
900 0 0 if $order > 0
901 0 0 if $order < 0
903 0 0 if $order > 0
0 0 if ($xn->is_subtype_of($yn)) { }
0 0 elsif ($yn->is_subtype_of($xn)) { }
904 0 0 if $order < 0
907 0 0 if ($xn eq $yn) { }
0 0 elsif ($yn eq 'OBJ' or eval { do { $xn->isa($yn) } }) { }
0 0 elsif ($xn eq 'OBJ' or eval { do { $yn->isa($xn) } }) { }
908 0 0 if $order > 0
909 0 0 if $order < 0
921 0 0 $arg{'keyword'} eq 'multimethod' ? :
1012 0 0 $arg{'verbose'} ? :
1013 0 0 $arg{'debug'} ? :
1014 0 0 $arg{'invocant'} ? :
1016 0 0 $arg{'invocant'} ? :
1021 0 0 if ($arg{'as_sub'})
1052 0 0 unless (ref $params)
1066 0 0 if exists $param->{'default'} and $param->{'default'} =~ /\A\s*\Z/u
1068 0 0 if (defined $default)
1069 0 0 if (exists $param->{'slurpy'})
1074 0 0 if ($default =~ /\b return \b/ux and $default =~ /$HAS_RETURN_STATEMENT/u and $Multi::Dispatch::has_return)
1081 0 0 if ($seen_slurpy) { }
0 0 elsif ($seen_option and not $param->{'slurpy'} and not $param->{'optional'}) { }
1092 0 0 if $param->{'slurpy'}
1099 0 0 if $param->{'subby'}
1105 0 0 unless (exists $param->{'constraint_code'})
1107 0 0 if ($param->{'type'})
1113 0 0 $param->{'antitype'} ? :
1114 0 0 if ($type eq 'OBJ') { }
0 0 elsif ($type =~ / \A [[:upper:]]++ \Z /msux) { }
1117 0 0 $param->{'antitype'} ? :
1122 0 0 $param->{'antitype'} ? :
1127 0 0 if $sigil eq "&"
1133 0 0 $param->{'hash'} ? :
0 0 $sigil eq '%' ? :
0 0 $param->{'array'} ? :
0 0 $sigil eq '@' ? :
1137 0 0 if (defined $type_check) { }
1139 0 0 if (not $seen{$type}++ and eval " no warnings; grep defined, \@${type}::{qw} " and warnings::enabled("ambiguous"))
1153 0 0 $param->{'antitype'} ? :
1161 0 0 if ($param->{'expr'} and $param->{'expr'} ne $param->{'var'})
1163 0 0 if defined $param_constraint
1165 0 0 if $param->{'constraint_desc'}
1170 0 0 if ($param->{'constraint'})
1172 0 0 if $param->{'constraint_desc'}
1174 0 0 if defined $param_constraint
1211 0 0 $match{'where_class'} ? :
0 0 $match{'where_pat'} ? :
0 0 $match{'where_str'} ? :
0 0 $match{'slurpy'} ? :
0 0 $match{'where_error'} ? :
0 0 exists $match{'where_num'} ? :
0 0 $match{'where_bool'} ? :
0 0 $match{'where_undef'} ? :
0 0 $match{'where_sub'} ? :
0 0 $match{'where_block'} ? :
1213 0 0 if ($type =~ / \A [[:upper:]]++ \Z /msux) { }
1218 0 0 if (defined $type_check) { }
1219 0 0 $sig[-1] eq 'undef' || $sig[-1] =~ /^q\{/u ? :
1226 0 0 if $match{'where_class_params'}
1228 0 0 if $sig[-1] eq "undef"
1243 0 0 if ($param->{'alias'})
1249 0 0 $param->{'sigil'} eq '&' ? :
0 0 $param->{'sigil'} eq '%' ? :
0 0 $param->{'sigil'} eq '@' ? :
0 0 $param->{'sigil'} eq '$' ? :
1255 0 0 if $param->{'array'} or $param->{'hash'}
1256 0 0 unless $param->{'optional'} or exists $param->{'slurpy'}
1257 0 0 if $param->{'optional'}
1267 0 0 $keyword eq 'multimethod' ? :
1268 0 0 if ($source_var ne "\@_")
1273 0 0 unless ($seen_slurpy)
1281 0 0 if ($seen_slurpy and $params[-1]{'sigil'} eq "%")
1284 0 0 !$params[-1]{'var'} || $params[-1]{'var'} =~ /\A._____/u ? :
1293 0 0 if exists $param->{'default'}
1295 0 0 if ($param->{'subby'}) { }
0 0 elsif ($param->{'alias'}) { }
1299 0 0 unless ($param->{'alias'})
1311 0 0 if ($_->{'subby'}) { }
1312 0 0 $_->{'subby'} ? :
1321 0 0 $varname =~ /\A\Q$nameless_name\E/u ? :
1325 0 0 if (exists $param->{'bool'}) { }
0 0 elsif (exists $param->{'num'}) { }
0 0 elsif (exists $param->{'str'}) { }
0 0 elsif (exists $param->{'pat'}) { }
0 0 elsif (exists $param->{'undef'}) { }
0 0 elsif (exists $param->{'array'}) { }
0 0 elsif (exists $param->{'hash'}) { }
1373 0 0 if $implicit_slurpy
1374 0 0 if length $internal_slurpy
1380 0 0 if ($implicit_slurpy) { }
1404 0 0 if (not exists $cap{'default'}) { }
1406 0 0 $implicit_slurpy ? :
1420 0 0 if exists $cap{'default'}
1425 0 0 length $internal_slurpy || $has_optionals ? :
1426 0 0 length $internal_slurpy || $has_optionals ? :
1428 0 0 $implicit_slurpy ? :
1434 0 0 if (not length $internal_slurpy) { }
0 0 elsif (length $internal_slurpy > 1) { }
1435 0 0 $implicit_slurpy ? :
1447 0 0 if (defined $param->{'constraint_code'})
1455 0 0 $sig_count ? :
1463 0 0 $opt_count ? :
0 0 $req_count ? :
0 0 $destructure_count ? :
0 0 $constraint_count && $constraint_count > $destructure_count ? :
0 0 $before && $before =~ /1/u ? :
1471 0 0 $seen_slurpy ? :
1495 0 0 unless $msg =~ s/ \n /\nat $file line $line/gmsux or $msg =~ s/ \h* / at $file line $line/gmsux