Branch Coverage

blib/lib/Queue/DBI.pm
Criterion Covered Total %
branch 97 142 68.3


line true false branch
182 2 97 if not defined $args{$arg} or $args{$arg} eq ''
185 1 47 if defined $args{'cleanup_timeout'} and not $args{'cleanup_timeout'} =~ /^\d+$/
187 1 46 if defined $args{'lifetime'} and not $args{'lifetime'} =~ /^\d+$/
189 1 45 if defined $args{'serializer_freeze'} and not Data::Validate::Type::is_coderef($args{'serializer_freeze'})
191 1 44 if defined $args{'serializer_thaw'} and not Data::Validate::Type::is_coderef($args{'serializer_thaw'})
193 2 42 if defined $args{'serializer_freeze'} xor defined $args{'serializer_thaw'}
233 36 6 defined $data && scalar @$data != 0 ? :
238 6 36 unless defined $queue_id and $queue_id =~ /^\d+$/
248 29 7 if defined $args{'cleanup_timeout'}
300 0 11 if $verbose
303 3 8 $exclude_locked_elements ? :
325 11 0 defined $data && scalar @$data != 0 && defined $$data[0] ? :
330 0 11 if $verbose
353 0 15 if $verbose
354 0 15 if $verbose > 1
357 0 15 if length $encoded_data > $MAX_VALUE_SIZE
360 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)
379 0 15 if $verbose
413 0 32 if $verbose
415 0 32 defined $args{'search_in_ids'} ? :
422 25 7 defined $elements && scalar @$elements != 0 ? :
426 0 32 if $verbose
460 0 32 if $verbose
463 0 32 unless defined $number_of_elements_to_retrieve and $number_of_elements_to_retrieve =~ /^\d+$/
467 21 11 unless (defined $$self{'max_id'})
485 21 0 defined $data && scalar @$data != 0 ? :
490 19 2 if (defined $max_id) { }
497 0 2 if $verbose
503 19 11 unless defined $$self{'last_id'}
507 3 27 if ($$self{'last_id'} == $$self{'max_id'})
509 0 3 if $verbose
515 12 15 defined $max_requeue_count ? :
521 3 24 defined $lifetime ? :
527 0 27 defined $args{'search_in_ids'} ? :
531 0 27 if $verbose
532 0 27 if $verbose > 1
559 0 27 if defined $dbh->errstr
562 2 25 if not defined $data or scalar @$data == 0
566 0 25 if $verbose
585 0 25 if $verbose
609 0 2 if $verbose
612 0 2 unless defined $queue_element_id
616 0 2 if $verbose
631 0 2 if defined $dbh->errstr
634 0 2 unless defined $data
637 0 2 if $verbose
647 0 2 if $verbose
672 0 30 if $verbose
675 0 30 unless $time_in_seconds =~ /^\d+$/
679 0 30 if $verbose
694 0 30 if defined $dbh->errstr
695 0 30 unless defined $rows
699 0 30 if $verbose
713 1 0 if $queue_element->requeue
716 0 30 if $verbose
718 0 30 if $verbose
748 0 7 if $verbose
754 0 7 if defined $max_requeue_count and not $max_requeue_count =~ /^\d+$/
756 0 7 if defined $lifetime and not $lifetime =~ /^\d+$/
758 1 6 if defined $lifetime and defined $max_requeue_count
760 1 3 unless defined $lifetime or defined $max_requeue_count
764 2 3 defined $lifetime ? :
767 3 2 defined $max_requeue_count ? :
790 0 5 if $verbose
793 3 2 $rows_deleted eq '0E0' ? :
835 0 36 if defined $max_requeue_count and not $max_requeue_count =~ /^\d+$/
880 0 38 if defined $lifetime and not $lifetime =~ /^\d+$/
956 2 14 defined $$self{'serializer'} && defined $$self{'serializer'}{'freeze'} ? :
973 2 27 defined $$self{'serializer'} && defined $$self{'serializer'}{'thaw'} ? :
1075 12 30 defined $$self{'table_names'}{'queues'} && $$self{'table_names'}{'queues'} ne '' ? :
1093 0 165 defined $$self{'table_names'}{'queue_elements'} && $$self{'table_names'}{'queue_elements'} ne '' ? :