Branch Coverage

blib/lib/Queue/DBI.pm
Criterion Covered Total %
branch 99 144 68.7


line true false branch
193 2 97 if not defined $args{$arg} or $args{$arg} eq ''
196 1 47 if defined $args{'cleanup_timeout'} and not $args{'cleanup_timeout'} =~ /^\d+$/
198 1 46 if defined $args{'lifetime'} and not $args{'lifetime'} =~ /^\d+$/
200 1 45 if defined $args{'serializer_freeze'} and not Data::Validate::Type::is_coderef($args{'serializer_freeze'})
202 1 44 if defined $args{'serializer_thaw'} and not Data::Validate::Type::is_coderef($args{'serializer_thaw'})
204 2 42 if defined $args{'serializer_freeze'} xor defined $args{'serializer_thaw'}
244 36 6 defined $data && scalar @$data != 0 ? :
249 6 36 unless defined $queue_id and $queue_id =~ /^\d+$/
259 29 7 if defined $args{'cleanup_timeout'}
311 0 11 if $verbose
314 3 8 $exclude_locked_elements ? :
336 11 0 defined $data && scalar @$data != 0 && defined $$data[0] ? :
341 0 11 if $verbose
381 0 16 if $verbose
382 0 16 if $verbose > 1
387 1 15 unless ref $data
391 0 15 if length $encoded_data > $MAX_VALUE_SIZE
394 0 15 unless $dbh->do(sprintf("\n\t\t\t\tINSERT INTO %s( queue_id, data, created )\n\t\t\t\tVALUES ( ?, ?, ? )\n\t\t\t", $dbh->quote_identifier($self->get_queue_elements_table_name)), {}, $self->get_queue_id, $encoded_data, time)
413 0 15 if $verbose
447 0 32 if $verbose
449 0 32 defined $args{'search_in_ids'} ? :
456 25 7 defined $elements && scalar @$elements != 0 ? :
460 0 32 if $verbose
494 0 32 if $verbose
497 0 32 unless defined $number_of_elements_to_retrieve and $number_of_elements_to_retrieve =~ /^\d+$/
501 21 11 unless (defined $$self{'max_id'})
519 21 0 defined $data && scalar @$data != 0 ? :
524 19 2 if (defined $max_id) { }
531 0 2 if $verbose
537 19 11 unless defined $$self{'last_id'}
541 3 27 if ($$self{'last_id'} == $$self{'max_id'})
543 0 3 if $verbose
549 12 15 defined $max_requeue_count ? :
555 3 24 defined $lifetime ? :
561 0 27 defined $args{'search_in_ids'} ? :
565 0 27 if $verbose
566 0 27 if $verbose > 1
593 0 27 if defined $dbh->errstr
596 2 25 if not defined $data or scalar @$data == 0
600 0 25 if $verbose
619 0 25 if $verbose
643 0 2 if $verbose
646 0 2 unless defined $queue_element_id
650 0 2 if $verbose
665 0 2 if defined $dbh->errstr
668 0 2 unless defined $data
671 0 2 if $verbose
681 0 2 if $verbose
706 0 30 if $verbose
709 0 30 unless $time_in_seconds =~ /^\d+$/
713 0 30 if $verbose
728 0 30 if defined $dbh->errstr
729 0 30 unless defined $rows
733 0 30 if $verbose
747 1 0 if $queue_element->requeue
750 0 30 if $verbose
752 0 30 if $verbose
782 0 7 if $verbose
788 0 7 if defined $max_requeue_count and not $max_requeue_count =~ /^\d+$/
790 0 7 if defined $lifetime and not $lifetime =~ /^\d+$/
792 1 6 if defined $lifetime and defined $max_requeue_count
794 1 3 unless defined $lifetime or defined $max_requeue_count
798 2 3 defined $lifetime ? :
801 3 2 defined $max_requeue_count ? :
824 0 5 if $verbose
827 3 2 $rows_deleted eq '0E0' ? :
869 0 36 if defined $max_requeue_count and not $max_requeue_count =~ /^\d+$/
914 0 38 if defined $lifetime and not $lifetime =~ /^\d+$/
990 2 14 defined $$self{'serializer'} && defined $$self{'serializer'}{'freeze'} ? :
1007 2 27 defined $$self{'serializer'} && defined $$self{'serializer'}{'thaw'} ? :
1109 12 30 defined $$self{'table_names'}{'queues'} && $$self{'table_names'}{'queues'} ne '' ? :
1127 0 165 defined $$self{'table_names'}{'queue_elements'} && $$self{'table_names'}{'queue_elements'} ne '' ? :