Branch Coverage

blib/lib/Message/SmartMerge.pm
Criterion Covered Total %
branch 43 60 71.6


line true false branch
246 0 8 if scalar @_ % 2
253 1 7 if $args{'state'} and $args{'state'}{'config'}
341 0 8 unless my $new_config = shift()
342 0 8 if not $$new_config{'merge_instance'} or ref $$new_config{'merge_instance'}
354 3 62 if ($$merge{'expire'} < $ts)
415 0 12 unless my $self = shift()
417 0 12 if not $merge && ref $merge or ref $merge ne 'HASH'
421 0 12 if scalar @_ % 2
426 0 12 if not $merge_id or ref $merge_id
429 0 12 if $$self{'merges'}{$merge_id}
431 3 9 if ($$merge{'expire'}) { }
447 3 12 unless mmatch($$instance{'message'}, $$merge{'match'})
497 0 62 unless my $self = shift()
499 0 62 if not $message && ref $message or ref $message ne 'HASH'
503 0 62 if scalar @_ % 2
519 0 62 unless my $instance_name = $$message{$$config{'merge_instance'}}
524 15 47 if (not $$instances{$instance_name}) { }
537 9 53 if $$instance{'cleared_merges'}{$merge_id}
539 47 6 if (mmatch($message, $$merge{'match'}))
544 9 38 if ($$merge{'toggle_fields'})
548 4 5 if (not defined $toggle_field_value && defined $previous_toggle_field_value or $toggle_field_value ne $previous_toggle_field_value)
558 3 44 if ($$merge{'remove_match'})
559 1 2 if (mmatch($message, $$merge{'remove_match'}))
565 42 5 if $include
612 0 7 unless my $self = shift()
614 0 7 if not $merge_id or ref $merge_id
617 0 7 if scalar @_ % 2
621 0 7 unless $$self{'merges'}{$merge_id}
635 0 17 if ($$instance{'cleared_merges'}{$merge_id})
639 8 9 unless mmatch($$instance{'message'}, $$merge{'match'})