Branch Coverage

blib/lib/Message/SmartMerge.pm
Criterion Covered Total %
branch 45 64 70.3


line true false branch
243 0 8 if scalar @_ % 2
249 0 8 if $args{'keep_only'}
254 1 7 if $args{'state'} and $args{'state'}{'config'}
340 0 8 unless my $new_config = shift()
343 0 8 if not $new_config->{'merge_instance'} or ref $new_config->{'merge_instance'}
353 3 62 if ($merge->{'expire'} < $ts)
362 62 0 unless ($self->{'config'} and $self->{'config'}{'keep_only'})
425 0 12 unless my $self = shift()
427 0 12 if not $merge && ref $merge or ref $merge ne 'HASH'
431 0 12 if scalar @_ % 2
436 0 12 if not $merge_id or ref $merge_id
440 0 12 if $self->{'merges'}{$merge_id}
441 3 9 if ($merge->{'expire'}) { }
457 3 12 unless mmatch($instance->{'message'}, $merge->{'match'})
507 0 62 unless my $self = shift()
509 0 62 if not $message && ref $message or ref $message ne 'HASH'
513 0 62 if scalar @_ % 2
530 0 62 unless my $instance_name = $$message{$config->{'merge_instance'}}
534 15 47 if (not $instances->{$instance_name}) { }
547 9 53 if $instance->{'cleared_merges'}{$merge_id}
549 47 6 if (mmatch($message, $merge->{'match'}))
554 9 38 if ($merge->{'toggle_fields'})
558 4 5 if (not defined $toggle_field_value && defined $previous_toggle_field_value or $toggle_field_value ne $previous_toggle_field_value)
568 3 44 if ($merge->{'remove_match'})
569 1 2 if (mmatch($message, $merge->{'remove_match'}))
575 42 5 if $include
622 0 7 unless my $self = shift()
624 0 7 if not $merge_id or ref $merge_id
627 0 7 if scalar @_ % 2
632 0 7 unless $self->{'merges'}{$merge_id}
645 0 17 if ($instance->{'cleared_merges'}{$merge_id})
649 8 9 unless mmatch($instance->{'message'}, $merge->{'match'})