Branch Coverage

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


line true false branch
31 0 1 if main::DEBUG()
40 0 24 if main::DEBUG()
42 0 24 if main::DEBUG()
44 0 24 unless ref $invocant
47 2 22 unless @delegators
50 0 22 if $$delegator{'other'} and keys %$delegated
53 14 8 if (@to == 1) { }
6 2 elsif (@as == 1) { }
54 0 14 if main::DEBUG()
55 0 14 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 22 unless keys %$delegated
79 0 0 @results > 1 ? :
10 12 @results > 1 ? :
0 22 $wantarray ? :
83 0 1 unless (*{"${class}::DESTROY";}{'CODE'} or _delegators_for($class, 'DESTROY'))
92 4 27 $to eq -'SELF' ? :
2 31 $to =~ /^->(\w+)$/ ? :
2 33 ref $to ? :
96 0 35 unless eval { do { $target->can('AUTOLOAD') unless $target->can($as) } }
97 0 35 unless $target->can($as)
99 0 35 $wantarray ? :
102 0 35 if $@
118 22 2 if @attrs
123 2 0 unless exists $mappings{$parent}
130 0 0 if @attrs
139 0 18 unless $send eq 'send'
141 0 18 unless @$args >= 2
144 0 18 unless $to eq 'to'
150 14 4 if (($$args[0] || '') eq 'as') { }
152 0 4 unless ref $to_val ne 'ARRAY' or ref $as_val ne 'ARRAY' or @$to_val == @$as_val
159 0 4 if $to_val eq -'SELF'
174 34 21 unless $type
175 0 21 unless exists $allowed{$subclass}{$type}
193 0 17 if $_[1] eq '-ALL'
194 0 17 if $_[-1] eq '-OTHER'
201 17 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 19 if $value eq '-ALL'
312 0 4 if main::DEBUG()