Branch Coverage

blib/lib/Sub/SymMethod.pm
Criterion Covered Total %
branch 53 76 69.7


line true false branch
42 0 2 unless (eval {
49 0 2 unless (eval {
53 0 0 if defined $_[0] and not ref $_[0]
58 0 2 unless (eval {
81 14 0 if defined $spec->{'method'}
83 1 13 if (is_ArrayRef($spec->{'signature'})) { }
84 1 0 $spec->{'named'} ? :
88 1 12 if ref $spec->{'named'}
95 58 14 if $KNOWN_OPTIONS{$key} or $key =~ /^_/
97 0 14 if ($BAD_OPTIONS{$key})
107 0 14 ref $sub_name ? :
110 14 0 if (is_Int($tp{'method'}))
111 0 14 if ($tp{'method'} > 1)
115 0 0 ref $tp{'head'} ? :
120 2 12 if $tp{'positional'} or $tp{'pos'} or $tp{'named'} or $tp{'multiple'} or $tp{'multi'}
125 14 0 unless exists $args{'origin'}
126 14 0 unless exists $args{'method'}
128 12 2 unless exists $args{'order'}
132 0 14 unless (is_CodeRef($args{'code'}))
141 6 8 'Role::Hooks'->is_role($target) ? :
143 8 6 if ($kind eq "class" and not $args{'no_dispatcher'})
147 6 8 if ($kind eq "role" and not $args{'no_hook'})
159 2 10 if (@_ == 2)
169 10 2 if (my $existing = $target->can($name))
170 10 0 if $class->is_dispatcher($existing)
175 0 2 if ($name eq "BUILD" or $name eq "DEMOLISH" or $name eq "new")
201 6 36 if ($spec->{'signature'} or $spec->{'signature_spec'})
202 2 4 unless is_CodeRef($spec->{'signature'})
207 2 4 unless eval {
235 2 4 if $HOOKED{$target}++
240 4 4 unless ("Role::Hooks"->is_role($consumer))
283 2 4 unless ($CACHE{$name}{$invocant_class})
289 0 2 unless &mro::get_linear_isa($invocant_class)
302 0 2 unless $spec->{'signature_spec'}
304 0 2 unless $spec->{'signature_spec'}
2 0 if keys %{{} unless $spec->{'signature_spec'};}
312 0 10 if ref $target
315 12 2 unless @_ % 2