Branch Coverage

blib/lib/Data/ModeMerge.pm
Criterion Covered Total %
branch 103 126 81.7


line true false branch
39 1 1685 unless defined $needle
41 8 1677 $r1 ? :
44 5 2578 if $r1 xor $r2
45 5 2573 if $r2 and $f1 eq dmp($_)
46 357 2216 if not $r2 and $needle eq $_
56 107 223 if ($self->config) { }
59 0 107 unless $is_hashref or UNIVERSAL::isa($self->config, 'Data::ModeMerge::Config')
61 107 0 if $is_hashref
70 330 0 if (not $self->combine_rules)
127 0 1980 if (ref $name0) { }
0 1980 elsif ($name0 =~ /^\w+(::\w+)+$/) { }
1980 0 elsif ($name0 =~ /^\w+$/) { }
131 0 0 if $@
135 0 1980 if $@
140 0 1980 if $self->modes->{$name}
147 2 17 if ref $hash_key
149 0 17 if (defined $dis and ref $dis ne 'ARRAY')
156 5 81 if ($mh->check_prefix($hash_key))
165 2 5 unless ref $hash eq 'HASH'
168 2 6 if ($self->check_prefix($_))
175 2 34 if ref $hash_key
177 0 34 if (defined $dis and ref $dis ne 'ARRAY')
180 0 34 if ($dis and $self->_in($mode, $dis))
184 0 34 unless my $mh = $self->modes->{$mode}
190 2 2291 if ref $hash_key
192 1 2290 if (defined $dis and ref $dis ne 'ARRAY')
198 912 10460 if ($mh->check_prefix($hash_key))
200 909 3 if (wantarray) { }
204 1377 1 if (wantarray) { }
210 2 1 unless ref $hash eq 'HASH'
214 1 3 unless $old ne $_
216 0 3 if exists $hash->{$_}
235 89 233 @{$self->errors;} ? :
244 746 9 if ($self->cur_mem_key)
247 2 1034 if (defined $res and @{$self->mem->{$mk}{'todo'};})
251 0 2 if @{$self->errors;}
265 0 776 unless $mh
270 377 0 !$rl ? :
4 377 $rl eq 'CODE' ? :
52 381 $rl eq 'ARRAY' ? :
343 433 $rl eq 'HASH' ? :
271 379 0 !$rr ? :
4 379 $rr eq 'CODE' ? :
53 383 $rr eq 'ARRAY' ? :
340 436 $rr eq 'HASH' ? :
272 0 776 unless ($tl)
273 0 776 unless ($tr)
274 5 1 if (not $c->allow_create_array and $tl ne 'ARRAY' and $tr eq 'ARRAY')
277 5 1 if (not $c->allow_create_hash and $tl ne 'HASH' and $tr eq 'HASH')
280 5 3 if (not $c->allow_destroy_array and $tl eq 'ARRAY' and $tr ne 'ARRAY')
283 5 3 if (not $c->allow_destroy_hash and $tl eq 'HASH' and $tr ne 'HASH')
287 0 756 unless ($mh->can($meth))
292 406 350 if ($rl or $rr)
293 387 15 $rl ? :
402 4 defined $l ? :
402 4 defined $l ? :
385 15 $rr ? :
400 6 defined $r ? :
400 6 defined $r ? :
304 406 350 if ($memkey) { }
305 3 403 if (exists $self->mem->{$memkey}) { }
307 0 3 if (defined $self->mem->{$memkey}{'res'}) { }
337 2 4 if (not defined $p2->[$i] or $p1->[$i] ne $p2->[$i])