Branch Coverage

blib/lib/Data/ModeMerge/Mode/Base.pm
Criterion Covered Total %
branch 181 196 92.3


line true false branch
48 0 11476 if ($self->check_prefix_sub) { }
57 4 97 if ($self->add_prefix_sub) { }
66 10 932 if ($self->remove_prefix_sub) { }
79 9 4 unless $c->recurse_array
80 0 4 if $c->wanted_path and not $mm->_path_is_included($mm->path, $c->wanted_path)
87 1 3 $la > $lb ? :
90 5 1 if ($i < $la and $i < $lb) { }
1 0 elsif ($i < $la) { }
93 0 5 if @{$mm->errors;}
94 0 5 if ($is_circular) { }
119 3 15 if (ref $sub ne 'CODE')
128 4 17 unless defined $k
129 1 16 if (exists $res->{$k})
150 11 555 if ($c->premerge_pair_filter)
153 4 7 if @{$mm->errors;}
157 553 9 if ($c->parse_prefix) { }
160 1 1170 if $do_parse and $ep and $mm->_in($_, $ep)
161 25 1145 if $do_parse and $ip and not $mm->_in($_, $ip)
162 2 1143 if $do_parse and $epr and /$epr/
163 15 1128 if $do_parse and $ipr and not /$ipr/
165 1128 43 if ($do_parse) { }
169 589 538 if $esub and not &$esub($_)
170 0 58 if ($old ne $_ and exists $l->{$_})
177 2 41 if $esub and not &$esub($_)
183 6 21 if $esub and not &$esub($_)
201 7 554 if ($c->premerge_pair_filter)
204 0 7 if @{$mm->errors;}
208 552 9 if ($c->parse_prefix) { }
211 9 1192 if $do_parse and $ep and $mm->_in($_, $ep)
212 18 1174 if $do_parse and $ip and not $mm->_in($_, $ip)
213 5 1169 if $do_parse and $epr and /$epr/
214 14 1155 if $do_parse and $ipr and not /$ipr/
216 1155 46 if ($do_parse) { }
220 605 550 if $esub and not &$esub($_)
221 0 550 if (exists $hr->{$_}{$m2})
229 2 44 if $esub and not &$esub($_)
235 5 20 if $esub and not &$esub($_)
262 6 700 if $do_merge and $em and $mm->_in($k, $em)
263 15 685 if $do_merge and $im and not $mm->_in($k, $im)
264 14 671 if $do_merge and $emr and $k =~ /$emr/
265 12 659 if $do_merge and $imr and not $k =~ /$imr/
267 47 659 unless ($do_merge)
268 45 2 if $hl->{$k}
272 435 118 if $hl->{$k} and $hr->{$k}
273 553 106 if ($hl->{$k})
276 541 118 if ($hr->{$k})
286 659 453 if ($i == 0) { }
288 3 656 if (@o == 1 and $hl->{$k} && $mh->can('merge_left_only') || $hr->{$k} && $mh->can('merge_right_only')) { }
292 1 2 $hl->{$k} ? :
294 3 0 unless defined $subnewkey
303 8 445 unless (my $m = $mm->combine_rules->{"$final_mode+$o[$i][0]"})
310 36 409 if @{$mm->errors;}
311 3 406 if ($is_circular)
312 1 2 if ($i < $#o)
323 2 0 if ($c->readd_prefix) { }
333 57 351 unless defined $subnewkey
337 552 2 unless $is_circular
351 443 65 if ($m eq $defmode) { }
355 0 65 if (exists $hh->{$kp})
372 4 300 unless $c->recurse_hash
373 2 298 if $c->wanted_path and not $mm->_path_is_included($mm->path, $c->wanted_path)
380 1 297 unless defined $ok
383 4 292 if @{$mm->errors;}
386 0 292 if @{$mm->errors;}
395 1 291 if @{$mm->errors;}
399 72 219 $res->{$ok} ? :
400 6 285 if (defined $res and ref $res ne 'HASH')
404 223 62 unless keys %$res
411 5 57 if ($c->allow_override)
413 2 3 unless (/$re/)
418 4 56 if ($c->disallow_override)
420 2 2 if (/$re/)
425 4 54 if ($mm->_in($_, $c->_config_config))
429 1 53 if ($_ ne $ok and not $mm->_in($_, $c->_config_ok))
433 53 0 unless $_ eq $ok
443 7 270 if (defined $sp)
444 2 5 if (ref $sp ne 'HASH')
451 7 23 if ($sp->{$n})
471 2 273 if (defined $ep and ref $ep ne 'ARRAY')
475 2 271 if (defined $ip and ref $ip ne 'ARRAY')
482 5 266 if (defined $epr)
484 1 4 if ($@)
489 5 265 if (defined $ipr)
491 1 4 if ($@)
498 583 3 defined $ok ? :
499 0 269 if @{$mm->errors;}
502 598 2 defined $ok ? :
503 0 269 if @{$mm->errors;}
510 2 267 if (defined $em and ref $em ne 'ARRAY')
514 2 265 if (defined $im and ref $im ne 'ARRAY')
521 13 252 if (defined $emr)
523 2 11 if ($@)
528 7 256 if (defined $imr)
530 1 6 if ($@)
538 44 218 if @{$mm->errors;}
543 197 21 if ($c->readd_prefix) { }
551 5 213 if ($saved_prefixes)
564 44 174 if ($config_replaced)