Branch Coverage

blib/lib/Class/Delegation.pm
Criterion Covered Total %
branch 56 92 60.8


line true false branch
31 0 2 if main::DEBUG()
40 0 25 if main::DEBUG()
42 0 25 if main::DEBUG()
44 0 25 unless ref $invocant
47 2 23 unless @delegators
50 0 23 if $delegator->{'other'} and keys %$delegated
53 15 8 if (@to == 1) { }
6 2 elsif (@as == 1) { }
54 0 15 if main::DEBUG()
55 0 15 if exists $$delegated{$to[0]}
61 0 6 if main::DEBUG()
63 0 15 if exists $delegated->{$to}
69 2 4 unless @to and @as
72 0 4 if exists $delegated->{$to}
77 0 23 unless keys %$delegated
79 0 0 @results > 1 ? :
10 13 @results > 1 ? :
0 23 $wantarray ? :
83 0 2 unless ($class->can('DESTROY') or _delegators_for($class, 'DESTROY'))
94 4 28 $to eq '-SELF' ? :
2 32 $to =~ /^->(\w+)$/ ? :
2 34 ref $to ? :
95 0 36 unless eval { do { $target->can('AUTOLOAD') unless $target->can($as) } }
96 0 36 unless $target->can($as)
98 0 36 $wantarray ? :
101 0 36 if $@
117 23 2 if @attrs
122 2 0 unless exists $mappings{$parent}
129 0 0 if @attrs
138 0 19 unless $send eq 'send'
140 0 19 unless @$args >= 2
143 0 19 unless $to eq 'to'
149 14 5 if (($args->[0] || '') eq 'as') { }
151 0 4 unless ref $to_val ne 'ARRAY' or ref $as_val ne 'ARRAY' or @$to_val == @$as_val
158 0 5 if $to_val eq '-SELF'
173 36 21 unless $type
175 0 21 unless exists $allowed{$subclass}{$type}
193 0 18 if $_[1] eq '-ALL'
194 0 18 if $_[-1] eq '-OTHER'
201 18 391 if $$self eq $context[1]
234 3 45 if $context[1] =~ /$$self/
248 2 46 if &$self(@context)
259 0 0 if $context[1] ne 'DESTROY'
270 0 0 if $context[1] ne 'DESTROY'
283 0 20 if $value eq '-ALL'
312 0 4 if main::DEBUG()